Skip to content

Commit

Permalink
Align function bodies correctly.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28073 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed May 3, 2006
1 parent 3db9e30 commit 0eb4d6b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/ExecutionEngine/JIT/JITEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 0eb4d6b

Please sign in to comment.