llvm-6502/lib
Mark Seaborn 09d1d540c8 Use 16 byte stack alignment for NaCl on ARM
NaCl's ARM ABI uses 16 byte stack alignment, so set that in
ARMSubtarget.cpp.

Using 16 byte alignment exposes an issue in code generation in which a
varargs function leaves a 4 byte gap between the values of r1-r3 saved
to the stack and the following arguments that were passed on the
stack.  (Previously, this code only needed to support 4 byte and 8
byte alignment.)

With this issue, llc generated:

varargs_func:
        sub     sp, sp, #16
        push    {lr}
        sub     sp, sp, #12
        add     r0, sp, #16   // Should be 20
        stm     r0, {r1, r2, r3}
        ldr     r0, .LCPI0_0  // Address of va_list
        add     r1, sp, #16
        str     r1, [r0]
        bl      external_func

Fix the bug by checking for "Align > 4".  Also simplify the code by
using OffsetToAlignment(), and update comments.

Differential Revision: http://llvm-reviews.chandlerc.com/D2677

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201497 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 18:59:48 +00:00
..
Analysis SCEVExpander: Try hard not to create derived induction variables in other loops 2014-02-16 15:49:50 +00:00
AsmParser [ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret' 2014-01-31 17:41:22 +00:00
Bitcode Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
CodeGen Add a DIELoc class to cover the DW_FORM_exprloc set of expressions 2014-02-16 08:46:55 +00:00
DebugInfo Support DWARF discriminators in object streamer. 2014-02-14 19:27:53 +00:00
ExecutionEngine Extend RTDyld API to enable optionally precomputing the total amount of memory 2014-02-12 21:30:07 +00:00
IR Remove unnecessary typename. 2014-02-16 14:12:35 +00:00
IRReader Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
LineEditor Avoid using EL_GETFP. 2014-02-04 20:04:46 +00:00
Linker Add a -suppress-warnings option to bitcode linking. 2014-02-06 18:01:56 +00:00
LTO LTO API: add lto_module_create_from_memory_with_path. 2014-02-10 23:26:14 +00:00
MC MCAsmParser: relax declaration parsing 2014-02-16 04:56:31 +00:00
Object Change the begin and end methods in ObjectFile to match the style guide. 2014-02-10 20:24:04 +00:00
Option Avoid buffer copies when a Twine already is a StringRef. 2013-12-03 18:18:28 +00:00
Support Use mkdir instead of stat+mkdir. 2014-02-13 16:58:19 +00:00
TableGen [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses 2014-01-02 20:47:09 +00:00
Target Use 16 byte stack alignment for NaCl on ARM 2014-02-16 18:59:48 +00:00
Transforms fixed typo in comment as my test commit 2014-02-16 10:43:25 +00:00
CMakeLists.txt Introduce line editor library. 2014-01-31 23:46:14 +00:00
LLVMBuild.txt Introduce line editor library. 2014-01-31 23:46:14 +00:00
Makefile Introduce line editor library. 2014-01-31 23:46:14 +00:00