[llvm-commits] [llvm] r56665 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Evan Cheng
evan.cheng at apple.com
Fri Sep 26 09:58:16 PDT 2008
Author: evancheng
Date: Fri Sep 26 11:58:16 2008
New Revision: 56665
URL: http://llvm.org/viewvc/llvm-project?rev=56665&view=rev
Log:
X86 address displacement field must be interpreted as a 32-bit value.
Modified:
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=56665&r1=56664&r2=56665&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Fri Sep 26 11:58:16 2008
@@ -427,9 +427,10 @@
// FrameIndex with base register with EBP. Add an offset to the offset.
MI.getOperand(i).ChangeToRegister(BasePtr, false);
- // Now add the frame object offset to the offset from EBP.
- int64_t Offset = getFrameIndexOffset(MF, FrameIndex) +
- MI.getOperand(i+3).getImm();
+ // Now add the frame object offset to the offset from EBP. Offset is a
+ // 32-bit integer.
+ int Offset = getFrameIndexOffset(MF, FrameIndex) +
+ (int)(MI.getOperand(i+3).getImm());
MI.getOperand(i+3).ChangeToImmediate(Offset);
}
More information about the llvm-commits
mailing list