Go to file
Kristof Beyls 933de7aa06 Fix large stack alignment codegen for ARM and Thumb2 targets
This partially fixes PR13007 (ARM CodeGen fails with large stack
alignment): for ARM and Thumb2 targets, but not for Thumb1, as it
seems stack alignment for Thumb1 targets hasn't been supported at
all.

Producing an aligned stack pointer is done by zero-ing out the lower
bits of the stack pointer. The BIC instruction was used for this.
However, the immediate field of the BIC instruction only allows to
encode an immediate that can zero out up to a maximum of the 8 lower
bits. When a larger alignment is requested, a BIC instruction cannot
be used; llvm was silently producing incorrect code in this case.

This commit fixes code generation for large stack aligments by
using the BFC instruction instead, when the BFC instruction is
available.  When not, it uses 2 instructions: a right shift,
followed by a left shift to zero out the lower bits.

The lowering of ARM::Int_eh_sjlj_dispatchsetup still has code
that unconditionally uses BIC to realign the stack pointer, so it
very likely has the same problem. However, I wasn't able to
produce a test case for that. This commit adds an assert so that
the compiler will fail the assert instead of silently generating
wrong code if this is ever reached.

llvm-svn: 225446
2015-01-08 15:09:14 +00:00
clang clang-format: Force line break between "endl" and "<<". 2015-01-08 13:56:57 +00:00
clang-tools-extra Fixed a typo in a comment. NFC. 2014-12-19 15:37:02 +00:00
compiler-rt [Sanitizers] Fix internal_lseek() to work on FreeBSD 2015-01-08 13:28:22 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Use amdgcn triple for SI+ GPUs 2015-01-06 20:42:12 +00:00
libcxx In early C++11 standard drafts, std::function derived from std::unary_function or std::binary_function if there was only one (or two) parameters. Before C++11 shipped, this restiction was lifted, but libc++ still does this (which is fine). However, the tests still check for this outdated requiremnt. Change then to check for the nested typedefs instead (which are still required by the standard). No change to the library. 2015-01-08 06:36:41 +00:00
libcxxabi Fix some formatting I messed up in r225187. 2015-01-05 19:31:59 +00:00
lld PE/COFF: add support to import functions in ARM NT 2015-01-08 04:19:08 +00:00
lldb [LLDB][MIPS] Adding SoftwareBreakpointTrapOpcode and RelocationJumpSlotType for MIPS 2015-01-08 09:46:29 +00:00
llgo [llgo] irgen: generate switch instructions 2015-01-08 07:49:28 +00:00
llvm Fix large stack alignment codegen for ARM and Thumb2 targets 2015-01-08 15:09:14 +00:00
openmp I apologise in advance for the size of this check-in. At Intel we do 2014-10-07 16:25:50 +00:00
polly todo: Remove some redundant topics 2015-01-07 21:28:44 +00:00