1 // RUN
: llvm-mc
-triple
=aarch64-none-linux-gnu
-filetype
=obj
%s
-o
- | \
2 // RUN
: llvm-readobj
-r | FileCheck
-check-prefix
=OBJ
%s
4 movz x0
, #:abs_g0:some_label
5 movk x0
, #:abs_g0_nc:some_label
7 movz x3
, #:abs_g1:some_label
8 movk x5
, #:abs_g1_nc:some_label
10 movz x3
, #:abs_g2:some_label
11 movk x5
, #:abs_g2_nc:some_label
13 movz x7
, #:abs_g3:some_label
14 movk x11
, #:abs_g3:some_label
16 movz x13
, #:abs_g0_s:some_label
17 movn x17
, #:abs_g0_s:some_label
19 movz x19
, #:abs_g1_s:some_label
20 movn x19
, #:abs_g1_s:some_label
22 movz x19
, #:abs_g2_s:some_label
23 movn x19
, #:abs_g2_s:some_label
25 movz x19
, #:abs_g1:some_label + 20 - 10
26 movn x19
, #:abs_g2_s:some_label - 20 + 10
27 movk x11
, #:abs_g3:some_label + 2 * 10
30 // OBJ-NEXT
: Section
{{.*}} .rela.text {
31 // OBJ-NEXT
: 0x0 R_AARCH64_MOVW_UABS_G0 some_label
0x0
32 // OBJ-NEXT
: 0x4 R_AARCH64_MOVW_UABS_G0_NC some_label
0x0
33 // OBJ-NEXT
: 0x8 R_AARCH64_MOVW_UABS_G1 some_label
0x0
34 // OBJ-NEXT
: 0xC R_AARCH64_MOVW_UABS_G1_NC some_label
0x0
35 // OBJ-NEXT
: 0x10 R_AARCH64_MOVW_UABS_G2 some_label
0x0
36 // OBJ-NEXT
: 0x14 R_AARCH64_MOVW_UABS_G2_NC some_label
0x0
37 // OBJ-NEXT
: 0x18 R_AARCH64_MOVW_UABS_G3 some_label
0x0
38 // OBJ-NEXT
: 0x1C R_AARCH64_MOVW_UABS_G3 some_label
0x0
39 // OBJ-NEXT
: 0x20 R_AARCH64_MOVW_SABS_G0 some_label
0x0
40 // OBJ-NEXT
: 0x24 R_AARCH64_MOVW_SABS_G0 some_label
0x0
41 // OBJ-NEXT
: 0x28 R_AARCH64_MOVW_SABS_G1 some_label
0x0
42 // OBJ-NEXT
: 0x2C R_AARCH64_MOVW_SABS_G1 some_label
0x0
43 // OBJ-NEXT
: 0x30 R_AARCH64_MOVW_SABS_G2 some_label
0x0
44 // OBJ-NEXT
: 0x34 R_AARCH64_MOVW_SABS_G2 some_label
0x0
45 // OBJ-NEXT
: 0x38 R_AARCH64_MOVW_UABS_G1 some_label
0xA
46 // OBJ-NEXT
: 0x3C R_AARCH64_MOVW_SABS_G2 some_label
0xFFFFFFFFFFFFFFF6
47 // OBJ-NEXT
: 0x40 R_AARCH64_MOVW_UABS_G3 some_label
0x14