diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-02 19:14:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-02 19:14:47 +0000 |
commit | e1c96369e27525978ee72620d47726cb81f4f257 (patch) | |
tree | a808eccd2040808207f846b2c688bfffc6f5055a /llvm/lib/Target/X86/X86JITInfo.cpp | |
parent | c9aa3715e874acbf3fe044154aab01cba90fd8f7 (diff) | |
download | bcm5719-llvm-e1c96369e27525978ee72620d47726cb81f4f257.tar.gz bcm5719-llvm-e1c96369e27525978ee72620d47726cb81f4f257.zip |
Fix a purely hypothetical problem (for now): emitWord emits in the host
byte format. This doesn't work when using the code emitter in a cross target
environment. Since the code emitter is only really used by the JIT, this
isn't a current problem, but if we ever start emitting .o files, it would be.
llvm-svn: 28060
Diffstat (limited to 'llvm/lib/Target/X86/X86JITInfo.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86JITInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86JITInfo.cpp b/llvm/lib/Target/X86/X86JITInfo.cpp index 7f93895deb9..3d1222128af 100644 --- a/llvm/lib/Target/X86/X86JITInfo.cpp +++ b/llvm/lib/Target/X86/X86JITInfo.cpp @@ -170,14 +170,14 @@ void *X86JITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) { if (Fn != X86CompilationCallback) { MCE.startFunctionStub(5); MCE.emitByte(0xE9); - MCE.emitWord((intptr_t)Fn-MCE.getCurrentPCValue()-4); + MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4); return MCE.finishFunctionStub(0); } MCE.startFunctionStub(6); MCE.emitByte(0xE8); // Call with 32 bit pc-rel destination... - MCE.emitWord((intptr_t)Fn-MCE.getCurrentPCValue()-4); + MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4); MCE.emitByte(0xCD); // Interrupt - Just a marker identifying the stub! return MCE.finishFunctionStub(0); |