[llvm-commits] [llvm] r76120 - in /llvm/trunk: lib/CodeGen/PrologEpilogInserter.cpp test/CodeGen/X86/inline-asm-tied.ll
Dale Johannesen
dalej at apple.com
Thu Jul 16 15:34:46 PDT 2009
Author: johannes
Date: Thu Jul 16 17:34:45 2009
New Revision: 76120
URL: http://llvm.org/viewvc/llvm-project?rev=76120&view=rev
Log:
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
Modified:
llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
llvm/trunk/test/CodeGen/X86/inline-asm-tied.ll
Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=76120&r1=76119&r2=76120&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original)
+++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Thu Jul 16 17:34:45 2009
@@ -148,6 +148,10 @@
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();
Modified: llvm/trunk/test/CodeGen/X86/inline-asm-tied.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/inline-asm-tied.ll?rev=76120&r1=76119&r2=76120&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/inline-asm-tied.ll (original)
+++ llvm/trunk/test/CodeGen/X86/inline-asm-tied.ll Thu Jul 16 17:34:45 2009
@@ -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"
More information about the llvm-commits
mailing list