summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:52:10 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:52:10 +0000
commit11665a64b055a8962a2dc1d5e787b1fad9d49544 (patch)
treefea4c271162c95d6ed3a27fc93e7545ecb5ac4fc /llvm
parent29329a0695bb4d274ddebb4f477e4d41ca09ccb6 (diff)
downloadbcm5719-llvm-11665a64b055a8962a2dc1d5e787b1fad9d49544.tar.gz
bcm5719-llvm-11665a64b055a8962a2dc1d5e787b1fad9d49544.zip
Emit correct offset for PseudoSourceValue
llvm-svn: 75946
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelLowering.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index c8ad01758cc..9cff6ea2f0d 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -194,6 +194,9 @@ SDValue SystemZTargetLowering::LowerCCCCallTo(SDValue Op, SelectionDAG &DAG,
DebugLoc dl = Op.getDebugLoc();
MachineFunction &MF = DAG.getMachineFunction();
+ // Offset to first argument stack slot.
+ const unsigned FirstArgOffset = 160;
+
// Analyze operands of the call, assigning locations to each operand.
SmallVector<CCValAssign, 16> ArgLocs;
CCState CCInfo(CC, isVarArg, getTargetMachine(), ArgLocs);
@@ -246,14 +249,13 @@ SDValue SystemZTargetLowering::LowerCCCCallTo(SDValue Op, SelectionDAG &DAG,
SystemZ::R11D : SystemZ::R15D),
getPointerTy());
- SDValue PtrOff =
- DAG.getNode(ISD::ADD, dl, getPointerTy(),
- StackPtr,
- DAG.getIntPtrConstant(160+VA.getLocMemOffset()));
+ unsigned Offset = FirstArgOffset + VA.getLocMemOffset();
+ SDValue PtrOff = DAG.getNode(ISD::ADD, dl, getPointerTy(),
+ StackPtr,
+ DAG.getIntPtrConstant(Offset));
MemOpChains.push_back(DAG.getStore(Chain, dl, Arg, PtrOff,
- PseudoSourceValue::getStack(),
- VA.getLocMemOffset()));
+ PseudoSourceValue::getStack(), Offset));
}
}
OpenPOWER on IntegriCloud