OLD | NEW |
| (Empty) |
1 ; Show that we convert direct calls, into indirect calls (to handle far | |
2 ; branches). | |
3 | |
4 ; NOTE: We use -O2 to get rid of memory stores. | |
5 | |
6 ; REQUIRES: allow_dump | |
7 | |
8 ; Compile using standalone assembler. | |
9 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 -allow-extern \ | |
10 ; RUN: -reg-use r5 | FileCheck %s --check-prefix=ASM | |
11 | |
12 ; Show bytes in assembled standalone code. | |
13 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | |
14 ; RUN: --args -O2 -allow-extern -reg-use r5 | FileCheck %s --check-prefix=DIS | |
15 | |
16 ; Compile using integrated assembler. | |
17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ | |
18 ; RUN: -allow-extern -reg-use r5 | FileCheck %s --check-prefix=IASM | |
19 | |
20 ; Show bytes in assembled integrated code. | |
21 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ | |
22 ; RUN: --args -O2 -allow-extern -reg-use r5 | FileCheck %s --check-prefix=DIS | |
23 | |
24 declare external void @doSomething() | |
25 | |
26 define internal void @callSomething() { | |
27 ; ASM-LABEL:callSomething: | |
28 ; DIS-LABEL:{{.+}} <callSomething>: | |
29 ; IASM-LABEL:callSomething: | |
30 | |
31 call void @doSomething(); | |
32 | |
33 ; ASM: movw r5, #:lower16:doSomething | |
34 ; DIS: {{.+}}: e3005000 | |
35 ; ASM-NOT: movw | |
36 | |
37 ; ASM-NEXT: movt r5, #:upper16:doSomething | |
38 ; DIS-NEXT: {{.+}}: e3405000 | |
39 ; ASM-NOT: movt | |
40 | |
41 ; ASM-NEXT: blx r5 | |
42 ; DIS-NEXT: {{.+}}: e12fff35 | |
43 ; ASM-NOT: blx | |
44 ret void | |
45 } | |
OLD | NEW |