[llvm-commits] CVS: llvm/lib/Target/X86/X86TargetMachine.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Fri Oct 17 13:28:00 PDT 2003
Changes in directory llvm/lib/Target/X86:
X86TargetMachine.cpp updated: 1.30 -> 1.31
---
Log message:
Implement replaceMachineCodeForFunction() for x86.
---
Diffs of the changes: (+7 -0)
Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.30 llvm/lib/Target/X86/X86TargetMachine.cpp:1.31
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.30 Sun Oct 5 14:15:47 2003
+++ llvm/lib/Target/X86/X86TargetMachine.cpp Fri Oct 17 13:27:46 2003
@@ -142,3 +142,10 @@
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;
+}
More information about the llvm-commits
mailing list