mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
X86 address displacement field must be interpreted as a 32-bit value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e52cb70767
commit
4367ff7aff
@ -427,9 +427,10 @@ void X86RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
|
|||||||
// FrameIndex with base register with EBP. Add an offset to the offset.
|
// FrameIndex with base register with EBP. Add an offset to the offset.
|
||||||
MI.getOperand(i).ChangeToRegister(BasePtr, false);
|
MI.getOperand(i).ChangeToRegister(BasePtr, false);
|
||||||
|
|
||||||
// Now add the frame object offset to the offset from EBP.
|
// Now add the frame object offset to the offset from EBP. Offset is a
|
||||||
int64_t Offset = getFrameIndexOffset(MF, FrameIndex) +
|
// 32-bit integer.
|
||||||
MI.getOperand(i+3).getImm();
|
int Offset = getFrameIndexOffset(MF, FrameIndex) +
|
||||||
|
(int)(MI.getOperand(i+3).getImm());
|
||||||
|
|
||||||
MI.getOperand(i+3).ChangeToImmediate(Offset);
|
MI.getOperand(i+3).ChangeToImmediate(Offset);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user