[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / AArch64 / arm64-large-relocs.s
blobd68006e333f69c25d2d8119e1f584bbe8964bfcd
1 // RUN: llvm-mc -triple=arm64-linux-gnu -show-encoding -o - %s | FileCheck %s
2 // RUN: llvm-mc -triple=arm64-linux-gnu -show-encoding -filetype=obj -o - %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-OBJ %s
4 movz x2, #:abs_g0:sym
5 movk w3, #:abs_g0_nc:sym
6 movz x2, #:prel_g0:sym
7 movk w3, #:prel_g0_nc:sym
8 // CHECK: movz x2, #:abs_g0:sym // encoding: [0bAAA00010,A,0b100AAAAA,0xd2]
9 // CHECK-NEXT: // fixup A - offset: 0, value: :abs_g0:sym, kind: fixup_aarch64_movw
10 // CHECK: movk w3, #:abs_g0_nc:sym // encoding: [0bAAA00011,A,0b100AAAAA,0x72]
11 // CHECK-NEXT: // fixup A - offset: 0, value: :abs_g0_nc:sym, kind: fixup_aarch64_movw
12 // CHECK: movz x2, #:prel_g0:sym // encoding: [0bAAA00010,A,0b100AAAAA,0xd2]
13 // CHECK-NEXT: // fixup A - offset: 0, value: :prel_g0:sym, kind: fixup_aarch64_movw
14 // CHECK: movk w3, #:prel_g0_nc:sym // encoding: [0bAAA00011,A,0b100AAAAA,0x72]
15 // CHECK-NEXT: // fixup A - offset: 0, value: :prel_g0_nc:sym, kind: fixup_aarch64_movw
17 // CHECK-OBJ: 0 R_AARCH64_MOVW_UABS_G0 sym
18 // CHECK-OBJ: 4 R_AARCH64_MOVW_UABS_G0_NC sym
19 // CHECK-OBJ: 8 R_AARCH64_MOVW_PREL_G0 sym
20 // CHECK-OBJ: c R_AARCH64_MOVW_PREL_G0_NC sym
22 movz x4, #:abs_g1:sym
23 movk w5, #:abs_g1_nc:sym
24 movz x4, #:prel_g1:sym
25 movk w5, #:prel_g1_nc:sym
26 // CHECK: movz x4, #:abs_g1:sym // encoding: [0bAAA00100,A,0b101AAAAA,0xd2]
27 // CHECK-NEXT: // fixup A - offset: 0, value: :abs_g1:sym, kind: fixup_aarch64_movw
28 // CHECK: movk w5, #:abs_g1_nc:sym // encoding: [0bAAA00101,A,0b101AAAAA,0x72]
29 // CHECK-NEXT: // fixup A - offset: 0, value: :abs_g1_nc:sym, kind: fixup_aarch64_movw
30 // CHECK: movz x4, #:prel_g1:sym // encoding: [0bAAA00100,A,0b101AAAAA,0xd2]
31 // CHECK-NEXT: // fixup A - offset: 0, value: :prel_g1:sym, kind: fixup_aarch64_movw
32 // CHECK: movk w5, #:prel_g1_nc:sym // encoding: [0bAAA00101,A,0b101AAAAA,0x72]
33 // CHECK-NEXT: // fixup A - offset: 0, value: :prel_g1_nc:sym, kind: fixup_aarch64_movw
35 // CHECK-OBJ: 10 R_AARCH64_MOVW_UABS_G1 sym
36 // CHECK-OBJ: 14 R_AARCH64_MOVW_UABS_G1_NC sym
37 // CHECK-OBJ: 18 R_AARCH64_MOVW_PREL_G1 sym
38 // CHECK-OBJ: 1c R_AARCH64_MOVW_PREL_G1_NC sym
40 movz x6, #:abs_g2:sym
41 movk x7, #:abs_g2_nc:sym
42 movz x6, #:prel_g2:sym
43 movk x7, #:prel_g2_nc:sym
44 // CHECK: movz x6, #:abs_g2:sym // encoding: [0bAAA00110,A,0b110AAAAA,0xd2]
45 // CHECK-NEXT: // fixup A - offset: 0, value: :abs_g2:sym, kind: fixup_aarch64_movw
46 // CHECK: movk x7, #:abs_g2_nc:sym // encoding: [0bAAA00111,A,0b110AAAAA,0xf2]
47 // CHECK-NEXT: // fixup A - offset: 0, value: :abs_g2_nc:sym, kind: fixup_aarch64_movw
48 // CHECK: movz x6, #:prel_g2:sym // encoding: [0bAAA00110,A,0b110AAAAA,0xd2]
49 // CHECK-NEXT: // fixup A - offset: 0, value: :prel_g2:sym, kind: fixup_aarch64_movw
50 // CHECK: movk x7, #:prel_g2_nc:sym // encoding: [0bAAA00111,A,0b110AAAAA,0xf2]
51 // CHECK-NEXT: // fixup A - offset: 0, value: :prel_g2_nc:sym, kind: fixup_aarch64_movw
53 // CHECK-OBJ: 20 R_AARCH64_MOVW_UABS_G2 sym
54 // CHECK-OBJ: 24 R_AARCH64_MOVW_UABS_G2_NC sym
55 // CHECK-OBJ: 28 R_AARCH64_MOVW_PREL_G2 sym
56 // CHECK-OBJ: 2c R_AARCH64_MOVW_PREL_G2_NC sym
58 movz x8, #:abs_g3:sym
59 movz x8, #:prel_g3:sym
60 // CHECK: movz x8, #:abs_g3:sym // encoding: [0bAAA01000,A,0b111AAAAA,0xd2]
61 // CHECK-NEXT: // fixup A - offset: 0, value: :abs_g3:sym, kind: fixup_aarch64_movw
62 // CHECK: movz x8, #:prel_g3:sym // encoding: [0bAAA01000,A,0b111AAAAA,0xd2]
63 // CHECK-NEXT: // fixup A - offset: 0, value: :prel_g3:sym, kind: fixup_aarch64_movw
65 // CHECK-OBJ: 30 R_AARCH64_MOVW_UABS_G3 sym
66 // CHECK-OBJ: 34 R_AARCH64_MOVW_PREL_G3 sym