diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-11-25 01:05:25 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-11-25 01:05:25 +0000 |
commit | 37fd537544769c7f4304141745ebee4a8677e783 (patch) | |
tree | 909303b02afcb6cf65792fbeccd53e165113145f /lib/Target | |
parent | 0106a0aafe8a169ad39736ddeb591ccde7cdca97 (diff) | |
download | external_llvm-37fd537544769c7f4304141745ebee4a8677e783.zip external_llvm-37fd537544769c7f4304141745ebee4a8677e783.tar.gz external_llvm-37fd537544769c7f4304141745ebee4a8677e783.tar.bz2 |
Use endianess dependent offsets for load/store of doubles when
using two swc/lwc instead of sdc/ldc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/Mips/MipsISelDAGToDAG.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsISelDAGToDAG.cpp b/lib/Target/Mips/MipsISelDAGToDAG.cpp index 2990ba9..43c3b70 100644 --- a/lib/Target/Mips/MipsISelDAGToDAG.cpp +++ b/lib/Target/Mips/MipsISelDAGToDAG.cpp @@ -235,6 +235,10 @@ SDNode *MipsDAGToDAGISel::SelectLoadFp64(SDValue N) { else return NULL; + // Choose the offsets depending on the endianess + if (TM.getTargetData()->isBigEndian()) + std::swap(Offset0, Offset1); + // Instead of: // ldc $f0, X($3) // Generate: @@ -296,6 +300,10 @@ SDNode *MipsDAGToDAGISel::SelectStoreFp64(SDValue N) { else return NULL; + // Choose the offsets depending on the endianess + if (TM.getTargetData()->isBigEndian()) + std::swap(Offset0, Offset1); + // Instead of: // sdc $f0, X($3) // Generate: |