Align stubs on 4 byte boundary. This fixes 447.dealII.

llvm-svn: 31790
This commit is contained in:
Evan Cheng 2006-11-16 20:13:34 +00:00
parent 8969ebca44
commit c5e769710e
1 changed files with 2 additions and 2 deletions

View File

@ -288,13 +288,13 @@ void *X86JITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) {
bool NotCC = Fn != (void*)(intptr_t)X86CompilationCallback; bool NotCC = Fn != (void*)(intptr_t)X86CompilationCallback;
#endif #endif
if (NotCC) { if (NotCC) {
MCE.startFunctionStub(5); MCE.startFunctionStub(5, 4);
MCE.emitByte(0xE9); MCE.emitByte(0xE9);
MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4); MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4);
return MCE.finishFunctionStub(0); return MCE.finishFunctionStub(0);
} }
MCE.startFunctionStub(6); MCE.startFunctionStub(6, 4);
MCE.emitByte(0xE8); // Call with 32 bit pc-rel destination... MCE.emitByte(0xE8); // Call with 32 bit pc-rel destination...
MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4); MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4);