aboutsummaryrefslogtreecommitdiff
path: root/llvm/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
commite1df90958d21bfe5b517b1fe7d73c5084026bf1a (patch)
tree537b4eb81547bfa22c4644d9960fb6d60a1bb6a7 /llvm/lib/Target/PowerPC/PPCSubtarget.cpp
parent785afdf3a48b3f38a0fd30edefc533ca1bf725f9 (diff)
downloadllvm-e1df90958d21bfe5b517b1fe7d73c5084026bf1a.zip
llvm-e1df90958d21bfe5b517b1fe7d73c5084026bf1a.tar.gz
llvm-e1df90958d21bfe5b517b1fe7d73c5084026bf1a.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. llvm-svn: 173993
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCSubtarget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
index 91beeae..18e4c07 100644
--- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+++ b/llvm/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