summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@freebsd.org>2011-02-22 17:30:05 +0000
committerRoman Divacky <rdivacky@freebsd.org>2011-02-22 17:30:05 +0000
commite8a93fe8f0c37262934099d560c9243173758774 (patch)
treeea5d12a2d609cf76d366c721bab0a337cf0101da /llvm
parent4f864d31115567c6c797746448a1c08fb4eac820 (diff)
downloadbcm5719-llvm-e8a93fe8f0c37262934099d560c9243173758774.tar.gz
bcm5719-llvm-e8a93fe8f0c37262934099d560c9243173758774.zip
Stack alignment is 16 bytes on FreeBSD/i386 too.
llvm-svn: 126226
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.cpp7
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.h1
2 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp
index 3f55144fc5e..1ee73123bbc 100644
--- a/llvm/lib/Target/X86/X86Subtarget.cpp
+++ b/llvm/lib/Target/X86/X86Subtarget.cpp
@@ -342,9 +342,10 @@ 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, Linux and Solaris (both 32 and 64
- // bit) and for all 64-bit targets.
- if (isTargetDarwin() || isTargetLinux() || isTargetSolaris() || Is64Bit)
+ // Stack alignment is 16 bytes on Darwin, FreeBSD, Linux and Solaris (both
+ // 32 and 64 bit) and for all 64-bit targets.
+ if (isTargetDarwin() || isTargetFreeBSD() || isTargetLinux() ||
+ isTargetSolaris() || Is64Bit)
stackAlignment = 16;
if (StackAlignment)
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h
index a1e47a20158..0a62a029554 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 isTargetFreeBSD() const { return TargetTriple.getOS() == Triple::FreeBSD; }
bool isTargetSolaris() const { return TargetTriple.getOS() == Triple::Solaris; }
// ELF is a reasonably sane default and the only other X86 targets we
OpenPOWER on IntegriCloud