Align function bodies correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28073 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-05-03 01:03:20 +00:00
parent 3db9e30c09
commit 0eb4d6b52e

View File

@ -107,9 +107,7 @@ unsigned char *JITMemoryManager::allocateStub(unsigned StubSize) {
}
unsigned char *JITMemoryManager::startFunctionBody() {
// Round up to an even multiple of 8 bytes, this should eventually be target
// specific.
return (unsigned char*)(((intptr_t)CurFunctionPtr + 7) & ~7);
return CurFunctionPtr;
}
void JITMemoryManager::endFunctionBody(unsigned char *FunctionEnd) {
@ -447,7 +445,7 @@ void JITEmitter::startFunction(MachineFunction &F) {
initJumpTableInfo(F.getJumpTableInfo());
// About to start emitting the machine code for the function.
// FIXME: align it?
emitAlignment(std::max(F.getFunction()->getAlignment(), 8U));
TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr);
}