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/XCore | |
| 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/XCore')
| -rw-r--r-- | llvm/test/CodeGen/XCore/align.ll | 4 | ||||
| -rw-r--r-- | llvm/test/CodeGen/XCore/epilogue_prologue.ll | 4 | ||||
| -rw-r--r-- | llvm/test/CodeGen/XCore/scavenging.ll | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/XCore/align.ll b/llvm/test/CodeGen/XCore/align.ll index 2878a648e09..53efa396290 100644 --- a/llvm/test/CodeGen/XCore/align.ll +++ b/llvm/test/CodeGen/XCore/align.ll @@ -1,13 +1,13 @@ ; RUN: llc < %s -march=xcore | FileCheck %s -; CHECK: .align 4 +; CHECK: .p2align 2 ; CHECK-LABEL: f: define void @f() nounwind { entry: ret void } -; CHECK: .align 2 +; CHECK: .p2align 1 ; CHECK-LABEL: g: define void @g() nounwind optsize { entry: diff --git a/llvm/test/CodeGen/XCore/epilogue_prologue.ll b/llvm/test/CodeGen/XCore/epilogue_prologue.ll index 923cc4a09e0..b6813f28558 100644 --- a/llvm/test/CodeGen/XCore/epilogue_prologue.ll +++ b/llvm/test/CodeGen/XCore/epilogue_prologue.ll @@ -101,7 +101,7 @@ entry: ; FP + large frame: spill FP+SR+R4+LR = entsp 3 + 200000 + extsp 1 ; CHECKFP: .section .cp.rodata.cst4,"aMc",@progbits,4 -; CHECKFP-NEXT: .align 4 +; CHECKFP-NEXT: .p2align 2 ; CHECKFP-NEXT: .LCPI[[CNST0:[0-9_]+]]: ; CHECKFP-NEXT: .long 200002 ; CHECKFP-NEXT: .LCPI[[CNST1:[0-9_]+]]: @@ -154,7 +154,7 @@ entry: ; ; !FP + large frame: spill SR+SR+R4+LR = entsp 4 + 200000 ; CHECK: .section .cp.rodata.cst4,"aMc",@progbits,4 -; CHECK-NEXT: .align 4 +; CHECK-NEXT: .p2align 2 ; CHECK-NEXT: .LCPI[[CNST0:[0-9_]+]]: ; CHECK-NEXT: .long 200003 ; CHECK-NEXT: .LCPI[[CNST1:[0-9_]+]]: diff --git a/llvm/test/CodeGen/XCore/scavenging.ll b/llvm/test/CodeGen/XCore/scavenging.ll index 7b6f54ebec2..b46c75a4aaf 100644 --- a/llvm/test/CodeGen/XCore/scavenging.ll +++ b/llvm/test/CodeGen/XCore/scavenging.ll @@ -53,7 +53,7 @@ declare void @g(i32*, i32*) ; CHECK: .section .cp.rodata.cst4,"aMc",@progbits,4 -; CHECK: .align 4 +; CHECK: .p2align 2 ; CHECK: [[ARG5:.LCPI[0-9_]+]]: ; CHECK: .long 100003 ; CHECK: [[INDEX0:.LCPI[0-9_]+]]: |

