[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / AArch64 / arm64-adr.s
blob131e545d3bb5c2852036df2e22e36531bd9f7c15
1 // RUN: not llvm-mc -triple arm64 -show-encoding < %s 2>%t | FileCheck %s
2 // RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s
4 adr x0, #0
5 adr x0, #1
6 adr x0, 1f
7 adr x0, foo
8 // CHECK: adr x0, #0 // encoding: [0x00,0x00,0x00,0x10]
9 // CHECK: adr x0, #1 // encoding: [0x00,0x00,0x00,0x30]
10 // CHECK: adr x0, .Ltmp0 // encoding: [A,A,A,0x10'A']
11 // CHECK-NEXT: // fixup A - offset: 0, value: .Ltmp0, kind: fixup_aarch64_pcrel_adr_imm21
12 // CHECK: adr x0, foo // encoding: [A,A,A,0x10'A']
13 // CHECK-NEXT: // fixup A - offset: 0, value: foo, kind: fixup_aarch64_pcrel_adr_imm21
15 adrp x0, #0
16 adrp x0, #4096
17 adrp x0, 1f
18 adrp x0, foo
19 // CHECK: adrp x0, #0 // encoding: [0x00,0x00,0x00,0x90]
20 // CHECK: adrp x0, #4096 // encoding: [0x00,0x00,0x00,0xb0]
21 // CHECK: adrp x0, .Ltmp0 // encoding: [A,A,A,0x90'A']
22 // CHECK-NEXT: // fixup A - offset: 0, value: .Ltmp0, kind: fixup_aarch64_pcrel_adrp_imm21
23 // CHECK: adrp x0, foo // encoding: [A,A,A,0x90'A']
24 // CHECK-NEXT: // fixup A - offset: 0, value: foo, kind: fixup_aarch64_pcrel_adrp_imm21
26 adr x0, #0xffffffff
27 adrp x0, #0xffffffff
28 adrp x0, #1
29 // CHECK-ERRORS: error: expected label or encodable integer pc offset
30 // CHECK-ERRORS: error: expected label or encodable integer pc offset
31 // CHECK-ERRORS: error: expected label or encodable integer pc offset