mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Make sure offset is 0 for load/store register to the stack call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116640 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6549121c66
commit
c9a91fdaf9
@ -762,7 +762,7 @@ bool ARMFastISel::ARMEmitLoad(EVT VT, unsigned &ResultReg,
|
||||
assert((Base.Reg == ARM::SP || Offset == 0) &&
|
||||
"Offset not zero and not a stack load!");
|
||||
|
||||
if (Base.Reg == ARM::SP)
|
||||
if (Base.Reg == ARM::SP && Offset == 0)
|
||||
TII.loadRegFromStackSlot(*FuncInfo.MBB, *FuncInfo.InsertPt,
|
||||
ResultReg, Base.FrameIndex, RC,
|
||||
TM.getRegisterInfo());
|
||||
@ -832,7 +832,7 @@ bool ARMFastISel::ARMEmitStore(EVT VT, unsigned SrcReg,
|
||||
break;
|
||||
}
|
||||
|
||||
if (Base.Reg == ARM::SP)
|
||||
if (Base.Reg == ARM::SP && Offset == 0)
|
||||
TII.storeRegToStackSlot(*FuncInfo.MBB, *FuncInfo.InsertPt,
|
||||
SrcReg, true /*isKill*/, Base.FrameIndex,
|
||||
TLI.getRegClassFor(VT), TM.getRegisterInfo());
|
||||
|
Loading…
Reference in New Issue
Block a user