[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Evan Cheng
evan.cheng at apple.com
Wed May 24 17:57:45 PDT 2006
Changes in directory llvm/lib/Target/PowerPC:
PPCISelLowering.cpp updated: 1.183 -> 1.184
---
Log message:
CALL node change (arg / sign pairs instead of just arguments).
---
Diffs of the changes: (+6 -5)
PPCISelLowering.cpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.183 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.184
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.183 Wed May 24 12:04:04 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Wed May 24 19:57:32 2006
@@ -901,7 +901,8 @@
bool isVarArg = cast<ConstantSDNode>(Op.getOperand(2))->getValue() != 0;
bool isTailCall = cast<ConstantSDNode>(Op.getOperand(3))->getValue() != 0;
SDOperand Callee = Op.getOperand(4);
-
+ unsigned NumOps = (Op.getNumOperands() - 5) / 2;
+
// args_to_use will accumulate outgoing args for the PPCISD::CALL case in
// SelectExpr to use to put the arguments in the appropriate registers.
std::vector<SDOperand> args_to_use;
@@ -912,8 +913,8 @@
unsigned NumBytes = 24;
// Add up all the space actually used.
- for (unsigned i = 5, e = Op.getNumOperands(); i != e; ++i)
- NumBytes += MVT::getSizeInBits(Op.getOperand(i).getValueType())/8;
+ for (unsigned i = 0; i != NumOps; ++i)
+ NumBytes += MVT::getSizeInBits(Op.getOperand(5+2*i).getValueType())/8;
// If we are calling what looks like a varargs function on the caller side,
// there are two cases:
@@ -962,8 +963,8 @@
std::vector<std::pair<unsigned, SDOperand> > RegsToPass;
std::vector<SDOperand> MemOpChains;
- for (unsigned i = 5, e = Op.getNumOperands(); i != e; ++i) {
- SDOperand Arg = Op.getOperand(i);
+ for (unsigned i = 0; i != NumOps; ++i) {
+ SDOperand Arg = Op.getOperand(5+2*i);
// PtrOff will be used to store the current argument to the stack if a
// register cannot be found for it.
More information about the llvm-commits
mailing list