Implement replaceMachineCodeForFunction() for x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9204 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Brian Gaeke 2003-10-17 18:27:46 +00:00
parent 4ca7e53690
commit 9b8c2911d9

View File

@ -142,3 +142,10 @@ bool X86TargetMachine::addPassesToJITCompile(FunctionPassManager &PM) {
return false; // success!
}
bool X86TargetMachine::replaceMachineCodeForFunction (void *Old, void *New) {
char *OldByte = (char *) Old;
*OldByte++ = 0xE9; // JMP
unsigned *OldWord = (unsigned *) OldByte;
*OldWord = (unsigned) New;
return false;
}