]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/switch-jump-table/switch.s
ld64-97.17.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 _foo:
13 nop
14 nop
15 #if __arm__ || __i386__
16 .long L1
17 .long L2
18 .long L3
19 #endif
20 nop
21 L1: nop
22 L2: nop
23 L3: nop
24 nop
25
26
27 /*
28 Simulate a switch statement in a regular function compiled
29 to a jump table
30 */
31 .text
32 .globl _bar
33 _bar: nop
34 nop
35 nop
36 nop
37 #if __arm__ || __i386__
38 .long L5
39 .long L6
40 .long L7
41 #endif
42 nop
43 L5: nop
44 L6: nop
45 L7: nop
46 nop
47
48
49