]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/linker-optimization-hints/AdrpLdr.s
ld64-305.tar.gz
[apple/ld64.git] / unit-tests / test-cases / linker-optimization-hints / AdrpLdr.s
1
2 #ifndef ADDEND
3 #define ADDEND
4 #endif
5
6 .text
7 .align 2
8 _test:
9 nop
10 L1: adrp x0, _foo ADDEND@PAGE
11 #if LOAD_GPR_8
12 L3: ldr b1, [x0, _foo ADDEND@PAGEOFF]
13 #elif LOAD_GPR_16
14 L3: ldr h1, [x0, _foo ADDEND@PAGEOFF]
15 #elif LOAD_GPR_32
16 L3: ldr w1, [x0, _foo ADDEND@PAGEOFF]
17 #elif LOAD_GPR_32_S16
18 L3: ldrsh w1, [x0, _foo ADDEND@PAGEOFF]
19 #elif LOAD_GPR_32_S8
20 L3: ldrsb w1, [x0, _foo ADDEND@PAGEOFF]
21 #elif LOAD_GPR_64
22 L3: ldr x1, [x0, _foo ADDEND@PAGEOFF]
23 #elif LOAD_GPR_64_S32
24 L3: ldrsw x1, [x0, _foo ADDEND@PAGEOFF]
25 #elif LOAD_GPR_64_S16
26 L3: ldrsh x1, [x0, _foo ADDEND@PAGEOFF]
27 #elif LOAD_GPR_64_S8
28 L3: ldrsb x1, [x0, _foo ADDEND@PAGEOFF]
29 #elif LOAD_FPR_32
30 L3: ldr s1, [x0, _foo ADDEND@PAGEOFF]
31 #elif LOAD_FPR_64
32 L3: ldr d1, [x0, _foo ADDEND@PAGEOFF]
33 #elif LOAD_VEC_128
34 L3: ldr q1, [x0, _foo ADDEND@PAGEOFF]
35 #endif
36 nop
37
38 .loh AdrpLdr L1, L3
39
40 #if PADDING
41 _pad:
42 .space 1100000
43 #endif
44
45 #if FOO_AS_CONSTANT
46 .literal4
47 #endif
48
49 #if FOO_AS_DATA
50 .data
51 _makePageOffsetNonZero: .long 0,0,0,0
52 #endif
53
54 #if MISALIGN_DATA
55 _junk: .byte 0
56 #endif
57
58 _foo: .long 0
59 .long 0
60 _8foo8: .long 0
61 .long 0
62 _16foo16: .long 0
63
64