mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
ARM: set preferred aggregate alignment to 32 universally.
Before, ARM and Thumb mode code had different preferred alignments, which could lead to some rather unexpected results. There's justification for reducing it from the default 64-bits (wasted space), but I don't think there is for going below 32-bits. There's no actual ABI change here, just to reassure people. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2a77e6bdd1
commit
eddeac0b8c
@ -123,10 +123,9 @@ static std::string computeDataLayout(ARMSubtarget &ST) {
|
||||
else
|
||||
Ret += "-v128:64:128";
|
||||
|
||||
// On thumb and APCS, only try to align aggregates to 32 bits (the default is
|
||||
// 64 bits).
|
||||
if (ST.isThumb() || ST.isAPCS_ABI())
|
||||
Ret += "-a:0:32";
|
||||
// Try to align aggregates to 32 bits (the default is 64 bits, which has no
|
||||
// particular hardware support on 32-bit ARM).
|
||||
Ret += "-a:0:32";
|
||||
|
||||
// Integer registers are 32 bits.
|
||||
Ret += "-n32";
|
||||
|
6
test/CodeGen/ARM/aggregate-align.ll
Normal file
6
test/CodeGen/ARM/aggregate-align.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: llc -mtriple=armv7-linux-gnueabi %s -o - | FileCheck %s
|
||||
|
||||
@var = global {i8, i8} zeroinitializer
|
||||
|
||||
; CHECK: .globl var
|
||||
; CHECK-NEXT: .align 2
|
Loading…
x
Reference in New Issue
Block a user