mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-30 08:56:40 +00:00
f4e788949d
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258750 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
226 B
LLVM
16 lines
226 B
LLVM
; RUN: llc < %s -march=xcore | FileCheck %s
|
|
|
|
; CHECK: .p2align 2
|
|
; CHECK-LABEL: f:
|
|
define void @f() nounwind {
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
; CHECK: .p2align 1
|
|
; CHECK-LABEL: g:
|
|
define void @g() nounwind optsize {
|
|
entry:
|
|
ret void
|
|
}
|