Assume an inline asm might be a call, so we get

stack alignment right when it is.  This is not
ideal but conservatively correct.  Adjust a test
to compensate for changed stack offset value.
gcc.apple/asm-block-57.c

llvm-svn: 76120
This commit is contained in:
Dale Johannesen 2009-07-16 22:34:45 +00:00
parent de9cd44ed8
commit c4148c4ec7
2 changed files with 5 additions and 1 deletions

View File

@ -148,6 +148,10 @@ void PEI::calculateCallsInformation(MachineFunction &Fn) {
if (Size > MaxCallFrameSize) MaxCallFrameSize = Size;
HasCalls = true;
FrameSDOps.push_back(I);
} else if (I->getOpcode() == TargetInstrInfo::INLINEASM) {
// An InlineAsm might be a call; assume it is to get the stack frame
// aligned correctly for calls.
HasCalls = true;
}
MachineFrameInfo *FFI = Fn.getFrameInfo();

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin9 -O0 | grep {movl %edx, 4(%esp)} | count 2
; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin9 -O0 | grep {movl %edx, 12(%esp)} | count 2
; rdar://6992609
target triple = "i386-apple-darwin9.0"