}
}
-bool UltraSparc::replaceMachineCodeForFunction (void *Old, void *New) {
+void UltraSparc::replaceMachineCodeForFunction (void *Old, void *New) {
if (!TheJITResolver) return true; // fail if not in JIT.
uint64_t Target = (uint64_t)(intptr_t)New;
uint64_t CodeBegin = (uint64_t)(intptr_t)Old;
TheJITResolver->insertJumpAtAddr(Target, CodeBegin);
- return false;
}
int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI,
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.
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!
}