[llvm-commits] [llvm] r126130 - in /llvm/trunk/lib/Target/X86: X86Subtarget.cpp X86Subtarget.h

Duncan Sands baldrick at free.fr
Mon Feb 21 09:37:17 PST 2011


Author: baldrick
Date: Mon Feb 21 11:37:17 2011
New Revision: 126130

URL: http://llvm.org/viewvc/llvm-project?rev=126130&view=rev
Log:
The stack should be 16 byte aligned on 32 bit solaris.  Patch by Yuri.

Modified:
    llvm/trunk/lib/Target/X86/X86Subtarget.cpp
    llvm/trunk/lib/Target/X86/X86Subtarget.h

Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=126130&r1=126129&r2=126130&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Mon Feb 21 11:37:17 2011
@@ -342,9 +342,9 @@
   assert((!Is64Bit || HasX86_64) &&
          "64-bit code requested on a subtarget that doesn't support it!");
 
-  // Stack alignment is 16 bytes on Darwin and Linux (both 32 and 64 bit) and 
-  // for all 64-bit targets.
-  if (isTargetDarwin() || isTargetLinux() || Is64Bit)
+  // Stack alignment is 16 bytes on Darwin, Linux and Solaris (both 32 and 64
+  // bit) and for all 64-bit targets.
+  if (isTargetDarwin() || isTargetLinux() || isTargetSolaris() || Is64Bit)
     stackAlignment = 16;
 
   if (StackAlignment)

Modified: llvm/trunk/lib/Target/X86/X86Subtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.h?rev=126130&r1=126129&r2=126130&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.h (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.h Mon Feb 21 11:37:17 2011
@@ -166,6 +166,7 @@
   bool hasVectorUAMem() const { return HasVectorUAMem; }
 
   bool isTargetDarwin() const { return TargetTriple.getOS() == Triple::Darwin; }
+  bool isTargetSolaris() const { return TargetTriple.getOS() == Triple::Solaris; }
 
   // ELF is a reasonably sane default and the only other X86 targets we
   // support are Darwin and Windows. Just use "not those".





More information about the llvm-commits mailing list