diff options
| author | Dan Gohman <dan433584@gmail.com> | 2016-01-26 00:03:25 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2016-01-26 00:03:25 +0000 |
| commit | 61d15ae4f56474164dff42708d9f7a19bb12ba1c (patch) | |
| tree | 4a63af2529f2012f11f776e01a37dabc98b1ff79 /llvm/test/CodeGen/PowerPC | |
| parent | 4d3b087c9376e77f43c4a45579417ea1498ee3d4 (diff) | |
| download | bcm5719-llvm-61d15ae4f56474164dff42708d9f7a19bb12ba1c.tar.gz bcm5719-llvm-61d15ae4f56474164dff42708d9f7a19bb12ba1c.zip | |
[MC] Use .p2align instead of .align
For historic reasons, the behavior of .align differs between targets.
Fortunately, there are alternatives, .p2align and .balign, which make the
interpretation of the parameter explicit, and which behave consistently across
targets.
This patch teaches MC to use .p2align instead of .align, so that people reading
code for multiple architectures don't have to remember which way each platform
does its .align directive.
Differential Revision: http://reviews.llvm.org/D16549
llvm-svn: 258750
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/align.ll | 20 | ||||
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/code-align.ll | 18 | ||||
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/ppc64-linux-func-size.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/ppc64-toc.ll | 2 |
5 files changed, 22 insertions, 22 deletions
diff --git a/llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll b/llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll index 1ba11d3fd03..160b26e9078 100644 --- a/llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll +++ b/llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll @@ -6,7 +6,7 @@ @_cmd = constant %cmd.type zeroinitializer ; CHECK: .globl __cmd -; CHECK-NEXT: .align 3 +; CHECK-NEXT: .p2align 3 ; CHECK-NEXT: __cmd: ; CHECK-NEXT: .byte 0 diff --git a/llvm/test/CodeGen/PowerPC/align.ll b/llvm/test/CodeGen/PowerPC/align.ll index 0797ca8d0be..52ac2c12e03 100644 --- a/llvm/test/CodeGen/PowerPC/align.ll +++ b/llvm/test/CodeGen/PowerPC/align.ll @@ -9,33 +9,33 @@ ; no alignment @c = global i16 2 -;ELF: .align 1 +;ELF: .p2align 1 ;ELF: c: -;DARWIN: .align 1 +;DARWIN: .p2align 1 ;DARWIN: _c: @d = global i32 3 -;ELF: .align 2 +;ELF: .p2align 2 ;ELF: d: -;DARWIN: .align 2 +;DARWIN: .p2align 2 ;DARWIN: _d: @e = global i64 4 -;ELF: .align 3 +;ELF: .p2align 3 ;ELF: e -;DARWIN: .align 3 +;DARWIN: .p2align 3 ;DARWIN: _e: @f = global float 5.0 -;ELF: .align 2 +;ELF: .p2align 2 ;ELF: f: -;DARWIN: .align 2 +;DARWIN: .p2align 2 ;DARWIN: _f: @g = global double 6.0 -;ELF: .align 3 +;ELF: .p2align 3 ;ELF: g: -;DARWIN: .align 3 +;DARWIN: .p2align 3 ;DARWIN: _g: @bar = common global [75 x i8] zeroinitializer, align 128 diff --git a/llvm/test/CodeGen/PowerPC/code-align.ll b/llvm/test/CodeGen/PowerPC/code-align.ll index 19d1b236ce0..e36f6f9d038 100644 --- a/llvm/test/CodeGen/PowerPC/code-align.ll +++ b/llvm/test/CodeGen/PowerPC/code-align.ll @@ -22,9 +22,9 @@ entry: ; GENERIC-LABEL: .globl foo ; BASIC-LABEL: .globl foo ; PWR-LABEL: .globl foo -; GENERIC: .align 2 -; BASIC: .align 4 -; PWR: .align 4 +; GENERIC: .p2align 2 +; BASIC: .p2align 4 +; PWR: .p2align 4 ; GENERIC: @foo ; BASIC: @foo ; PWR: @foo @@ -41,9 +41,9 @@ entry: ; GENERIC: mtctr ; BASIC: mtctr ; PWR: mtctr -; GENERIC-NOT: .align -; BASIC: .align 4 -; PWR: .align 4 +; GENERIC-NOT: .p2align +; BASIC: .p2align 4 +; PWR: .p2align 4 ; GENERIC: lwzu ; BASIC: lwzu ; PWR: lwzu @@ -83,9 +83,9 @@ entry: ; GENERIC: mtctr ; BASIC: mtctr ; PWR: mtctr -; GENERIC-NOT: .align -; BASIC: .align 4 -; PWR: .align 5 +; GENERIC-NOT: .p2align +; BASIC: .p2align 4 +; PWR: .p2align 5 ; GENERIC: bdnz ; BASIC: bdnz ; PWR: bdnz diff --git a/llvm/test/CodeGen/PowerPC/ppc64-linux-func-size.ll b/llvm/test/CodeGen/PowerPC/ppc64-linux-func-size.ll index fb017bc224b..6f8351bb5bd 100644 --- a/llvm/test/CodeGen/PowerPC/ppc64-linux-func-size.ll +++ b/llvm/test/CodeGen/PowerPC/ppc64-linux-func-size.ll @@ -2,7 +2,7 @@ ; CHECK: .section .opd,"aw",@progbits ; CHECK-NEXT: test1: -; CHECK-NEXT: .align 3 +; CHECK-NEXT: .p2align 3 ; CHECK-NEXT: .quad .L[[BEGIN:.*]] ; CHECK-NEXT: .quad .TOC.@tocbase ; CHECK-NEXT: .quad 0 diff --git a/llvm/test/CodeGen/PowerPC/ppc64-toc.ll b/llvm/test/CodeGen/PowerPC/ppc64-toc.ll index 7500ed60663..8d35cba2d43 100644 --- a/llvm/test/CodeGen/PowerPC/ppc64-toc.ll +++ b/llvm/test/CodeGen/PowerPC/ppc64-toc.ll @@ -9,7 +9,7 @@ target triple = "powerpc64-unknown-linux-gnu" define i64 @access_int64(i64 %a) nounwind readonly { entry: ; CHECK-LABEL: access_int64: -; CHECK-NEXT: .align 3 +; CHECK-NEXT: .p2align 3 ; CHECK-NEXT: .quad .L[[BEGIN:.*]] ; CHECK-NEXT: .quad .TOC.@tocbase ; CHECK-NEXT: .quad 0 |

