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