Implement replaceMachineCodeForFunction() for x86.

llvm-svn: 9204
This commit is contained in:
Brian Gaeke 2003-10-17 18:27:46 +00:00
parent 2e24fcadf5
commit 1a7668a9fd
1 changed files with 7 additions and 0 deletions

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;
}