[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Chris Lattner
sabre at nondot.org
Tue Mar 6 12:01:24 PST 2007
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.482 -> 1.483
---
Log message:
big endian 32-bit systems (e.g. ppc32) want to return the high reg first, not
the lo-reg first. This is fallout from my ppc calling conv change yesterday,
it fixes test/ExecutionEngine/2003-05-06-LivenessClobber.llx
---
Diffs of the changes: (+5 -0)
LegalizeDAG.cpp | 5 +++++
1 files changed, 5 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.482 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.483
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.482 Sat Mar 3 17:43:21 2007
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Mar 6 14:01:06 2007
@@ -1675,6 +1675,11 @@
if (Tmp2.getValueType() != MVT::Vector) {
SDOperand Lo, Hi;
ExpandOp(Tmp2, Lo, Hi);
+
+ // Big endian systems want the hi reg first.
+ if (!TLI.isLittleEndian())
+ std::swap(Lo, Hi);
+
if (Hi.Val)
Result = DAG.getNode(ISD::RET, MVT::Other, Tmp1, Lo, Tmp3, Hi,Tmp3);
else
More information about the llvm-commits
mailing list