[llvm-commits] [llvm] r126226 - in /llvm/trunk/lib/Target/X86: X86Subtarget.cpp X86Subtarget.h
Roman Divacky
rdivacky at freebsd.org
Tue Feb 22 09:30:05 PST 2011
Author: rdivacky
Date: Tue Feb 22 11:30:05 2011
New Revision: 126226
URL: http://llvm.org/viewvc/llvm-project?rev=126226&view=rev
Log:
Stack alignment is 16 bytes on FreeBSD/i386 too.
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=126226&r1=126225&r2=126226&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Tue Feb 22 11:30:05 2011
@@ -342,9 +342,10 @@
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)
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.h?rev=126226&r1=126225&r2=126226&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.h (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.h Tue Feb 22 11:30:05 2011
@@ -166,6 +166,7 @@
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
More information about the llvm-commits
mailing list