aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCSubtarget.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-01-30 23:43:27 +0000
committerHal Finkel <hfinkel@anl.gov>2013-01-30 23:43:27 +0000
commit9a79b320cb7f179118e69427bc684f2232a24bd9 (patch)
tree590dbd81775c02a9d43cf62852ea6c50917024e7 /lib/Target/PowerPC/PPCSubtarget.cpp
parentac72eb264c3a8a15cda81aaead6adc8419058666 (diff)
downloadexternal_llvm-9a79b320cb7f179118e69427bc684f2232a24bd9.zip
external_llvm-9a79b320cb7f179118e69427bc684f2232a24bd9.tar.gz
external_llvm-9a79b320cb7f179118e69427bc684f2232a24bd9.tar.bz2
PPC QPX requires a 32-byte aligned stack
On systems which support the QPX vector instructions, the stack must be 32-byte aligned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173993 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCSubtarget.cpp')
-rw-r--r--lib/Target/PowerPC/PPCSubtarget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCSubtarget.cpp b/lib/Target/PowerPC/PPCSubtarget.cpp
index 91beeae..18e4c07 100644
--- a/lib/Target/PowerPC/PPCSubtarget.cpp
+++ b/lib/Target/PowerPC/PPCSubtarget.cpp
@@ -83,6 +83,12 @@ PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU,
// Set up darwin-specific properties.
if (isDarwin())
HasLazyResolverStubs = true;
+
+ // QPX requires a 32-byte aligned stack. Note that we need to do this if
+ // we're compiling for a BG/Q system regardless of whether or not QPX
+ // is enabled because external functions will assume this alignment.
+ if (hasQPX() || isBGQ())
+ StackAlignment = 32;
}
/// SetJITMode - This is called to inform the subtarget info that we are