]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/switch-jump-table/switch.s
ld64-136.tar.gz
[apple/ld64.git] / unit-tests / test-cases / switch-jump-table / switch.s
1
2 .section __TEXT,__textcoal_nt,coalesced,pure_instructions
3
4
5
6 /*
7 Simulate a switch statement in a weak function compiled
8 to a jump table
9 */
10 .globl _foo
11 .weak_definition _foo
12 .align 4
13 _foo:
14 nop
15 nop
16 #if __arm__ || __i386__
17 .long L1
18 .long L2
19 .long L3
20 #endif
21 nop
22 L1: nop
23 L2: nop
24 L3: nop
25 nop
26
27
28 /*
29 Simulate a switch statement in a regular function compiled
30 to a jump table
31 */
32 .text
33 .align 4
34 .globl _bar
35 _bar: nop
36 nop
37 nop
38 nop
39 #if __arm__ || __i386__
40 .long L5
41 .long L6
42 .long L7
43 #endif
44 nop
45 L5: nop
46 L6: nop
47 L7: nop
48 nop
49
50
51