summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-10-15 00:28:24 +0000
committerChad Rosier <mcrosier@apple.com>2011-10-15 00:28:24 +0000
commit1809d6c0d53a8feeeb32aad4bdef5f1b25eed2d7 (patch)
treecd7b8f86d2c371399368ea78c2d80e8b2161227d /llvm/lib/Target/ARM
parent9c1019c6c721f2823585aa5bd765abef5d243d73 (diff)
downloadbcm5719-llvm-1809d6c0d53a8feeeb32aad4bdef5f1b25eed2d7.tar.gz
bcm5719-llvm-1809d6c0d53a8feeeb32aad4bdef5f1b25eed2d7.zip
Thumb1 does not support dynamic stack realignment.
rdar://10288916 is tracking this fix. In the past, instcombine and other passes were promoting alloca alignment past the natural alignment, resulting in dynamic stack realignment. Lang's work now prevents this from happening (LLVM commit r141599). Now that this really shouldn't happen report a fatal error rather than silently generate bad code. llvm-svn: 142028
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r--llvm/lib/Target/ARM/Thumb1FrameLowering.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp b/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
index d4d59ea59da..d8481778c0d 100644
--- a/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
+++ b/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
@@ -155,6 +155,11 @@ void Thumb1FrameLowering::emitPrologue(MachineFunction &MF) const {
AFI->setGPRCalleeSavedArea2Size(GPRCS2Size);
AFI->setDPRCalleeSavedAreaSize(DPRCSSize);
+ // Thumb1 does not currently support dynamic stack realignment. Report a
+ // fatal error rather then silently generate bad code.
+ if (RegInfo->needsStackRealignment(MF))
+ report_fatal_error("Dynamic stack realignment not supported for thumb1.");
+
// If we need a base pointer, set it up here. It's whatever the value
// of the stack pointer is at this point. Any variable size objects
// will be allocated after this, so we can still use the base pointer
OpenPOWER on IntegriCloud