]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/linker-optimization-hints/AdrpAddStr.s
ld64-409.12.tar.gz
[apple/ld64.git] / unit-tests / test-cases / linker-optimization-hints / AdrpAddStr.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: str b1, [x0, #ADDEND]
14 #elif LOAD_GPR_16
15 L3: str h1, [x0, #ADDEND]
16 #elif LOAD_GPR_32
17 L3: str w1, [x0, #ADDEND]
18 #elif LOAD_GPR_64
19 L3: str x1, [x0, #ADDEND]
20 #elif LOAD_FPR_32
21 L3: str s1, [x0, #ADDEND]
22 #elif LOAD_FPR_64
23 L3: str d1, [x0, #ADDEND]
24 #elif LOAD_VEC_128
25 L3: str q1, [x0, #ADDEND]
26 #endif
27 nop
28
29 .loh AdrpAddStr L1, L2, L3
30
31 .data
32 _makePageOffsetNonZero: .long 0,0,0,0
33
34 #if MISALIGN_DATA
35 _junk: .byte 0
36 #endif
37
38 _foo: .long 0
39 .long 0
40 _8foo8: .long 0
41 .long 0
42 _16foo16: .long 0
43
44