Assume an inline asm might be a call, so we get
authorDale Johannesen <dalej@apple.com>
Thu, 16 Jul 2009 22:34:45 +0000 (22:34 +0000)
committerDale Johannesen <dalej@apple.com>
Thu, 16 Jul 2009 22:34:45 +0000 (22:34 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76120 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/PrologEpilogInserter.cpp
test/CodeGen/X86/inline-asm-tied.ll

index 970e395615d9ed5c6be731c8f74bf1967cde2b3c..546a84ec876286750f478c18c8348bc2666a6552 100644 (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();
index 6df2c48415bc7927b3933177652985b73269c1bd..9cc944b2bc6bf1c4de12bf9bf935c26738a984c4 100644 (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"