The stack should be 16 byte aligned on 32 bit solaris. Patch by Yuri.
authorDuncan Sands <baldrick@free.fr>
Mon, 21 Feb 2011 17:37:17 +0000 (17:37 +0000)
committerDuncan Sands <baldrick@free.fr>
Mon, 21 Feb 2011 17:37:17 +0000 (17:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126130 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86Subtarget.h

index de768561f111ce90d03753bdd57ed6978f254f37..3f55144fc5eaa69baeafda00f31946c8bb95957c 100644 (file)
@@ -342,9 +342,9 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &FS,
   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)
index 8a119b43cd91e8945007db22a4cfc9bf65d75bfa..a1e47a201585e24a060fbce8ac2aa49f13eb576c 100644 (file)
@@ -166,6 +166,7 @@ public:
   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".