Fix warnings building on sparc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9758 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-11-06 21:30:05 +00:00
parent 2852c4db67
commit 2bee057a56

View File

@ -149,7 +149,7 @@ void X86TargetMachine::replaceMachineCodeForFunction (void *Old, void *New) {
char *OldByte = (char *) Old;
*OldByte++ = 0xE9; // Emit JMP opcode.
int32_t *OldWord = (int32_t *) OldByte;
int32_t NewAddr = (int32_t) New;
int32_t OldAddr = (int32_t) OldWord;
int32_t NewAddr = (intptr_t) New;
int32_t OldAddr = (intptr_t) OldWord;
*OldWord = NewAddr - OldAddr - 4; // Emit PC-relative addr of New code.
}