[llvm-commits] [llvm] r76120 - in /llvm/trunk: lib/CodeGen/PrologEpilogInserter.cpp test/CodeGen/X86/inline-asm-tied.ll

Chris Lattner clattner at apple.com
Thu Jul 16 18:49:50 PDT 2009


On Jul 16, 2009, at 3:34 PM, Dale Johannesen wrote:

> 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

Makes sense to me, thanks Dale!

-Chris

>
>
> 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"
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list