diff options
author | Duncan Sands <baldrick@free.fr> | 2011-02-21 17:37:17 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2011-02-21 17:37:17 +0000 |
commit | bda7175a433e729cf962486f9b858b4c1e6b4f15 (patch) | |
tree | 6d3fcebe81cfb7e2a508753804170a0e00bf9e5c /llvm/lib | |
parent | ecbbf0825b874c0605517f621adb8ee635a74ea1 (diff) | |
download | bcm5719-llvm-bda7175a433e729cf962486f9b858b4c1e6b4f15.tar.gz bcm5719-llvm-bda7175a433e729cf962486f9b858b4c1e6b4f15.zip |
The stack should be 16 byte aligned on 32 bit solaris. Patch by Yuri.
llvm-svn: 126130
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.h | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp index de768561f11..3f55144fc5e 100644 --- a/llvm/lib/Target/X86/X86Subtarget.cpp +++ b/llvm/lib/Target/X86/X86Subtarget.cpp @@ -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) diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index 8a119b43cd9..a1e47a20158 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -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". |