]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/linker-optimization-hints/AdrpLdrGotStr.s
ld64-305.tar.gz
[apple/ld64.git] / unit-tests / test-cases / linker-optimization-hints / AdrpLdrGotStr.s
1
2 #ifndef TARGET
3 #define TARGET _foo
4 #endif
5
6 .text
7 .align 2
8 _test:
9 nop
10 L1: adrp x0, TARGET@GOTPAGE
11 L2: ldr x1, [x0, #TARGET@GOTPAGEOFF]
12 #if LOAD_GPR_8
13 L3: str b2, [x1]
14 #elif LOAD_GPR_16
15 L3: str h2, [x1]
16 #elif LOAD_GPR_32
17 L3: str w2, [x1]
18 #elif LOAD_GPR_64
19 L3: str x2, [x1]
20 #elif LOAD_FPR_32
21 L3: str s2, [x1]
22 #elif LOAD_FPR_64
23 L3: str d2, [x1]
24 #elif LOAD_VEC_128
25 L3: str q2, [x1]
26 #endif
27 nop
28
29 .loh AdrpLdrGotStr L1, L2, L3
30
31 #if PADDING
32 _pad:
33 .space 1100000
34 #endif
35
36 .data
37 _makePageOffsetNonZero: .long 0,0,0,0
38
39 #if MISALIGN_DATA
40 _junk: .byte 0
41 #endif
42
43 _foo: .long 0
44 .long 0
45 _8foo8: .long 0
46 .long 0
47 _16foo16: .long 0
48
49