mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Make replaceMachineCodeForFunction return void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9288 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -137,7 +137,7 @@ bool X86TargetMachine::addPassesToJITCompile(FunctionPassManager &PM) {
|
||||
return false; // success!
|
||||
}
|
||||
|
||||
bool X86TargetMachine::replaceMachineCodeForFunction (void *Old, void *New) {
|
||||
void X86TargetMachine::replaceMachineCodeForFunction (void *Old, void *New) {
|
||||
// FIXME: This code could perhaps live in a more appropriate place.
|
||||
char *OldByte = (char *) Old;
|
||||
*OldByte++ = 0xE9; // Emit JMP opcode.
|
||||
@@ -145,5 +145,4 @@ bool X86TargetMachine::replaceMachineCodeForFunction (void *Old, void *New) {
|
||||
int32_t NewAddr = (int32_t) New;
|
||||
int32_t OldAddr = (int32_t) OldWord;
|
||||
*OldWord = NewAddr - OldAddr - 4; // Emit PC-relative addr of New code.
|
||||
return false; // success!
|
||||
}
|
||||
|
Reference in New Issue
Block a user