OLD | NEW |
---|---|
(Empty) | |
1 ; Show that we know how to translate vpush and vpop. | |
2 | |
3 ; NOTE: We use -O2 because vpush/vpop only occur if optimized. Uses | |
4 ; simple call with double parameters to cause the insertion of | |
5 ; vpush/vpop. | |
6 | |
7 ; REQUIRES: allow_dump | |
8 | |
9 ; Compile using standalone assembler. | |
10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ | |
11 ; RUN: | FileCheck %s --check-prefix=ASM | |
12 | |
13 ; Show bytes in assembled standalone code. | |
14 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | |
15 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS | |
16 | |
17 ; Compile using integrated assembler. | |
18 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ | |
19 ; RUN: | FileCheck %s --check-prefix=IASM | |
20 | |
21 ; Show bytes in assembled integrated code. | |
22 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ | |
23 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS | |
24 | |
25 define internal double @testVpushVpop(double %v1, double %v2) { | |
26 ; ASM-LABEL: testVpushVpop: | |
27 ; DIS-LABEL: 00000000 <testVpushVpop>: | |
28 ; IASM-LABEL: testVpushVpop: | |
29 | |
30 entry: | |
31 ; ASM-NEXT: .LtestVpushVpop$entry: | |
32 ; IASM-NEXT: .LtestVpushVpop$entry: | |
33 | |
34 ; ASM-NEXT: vpush {s28, s29, s30, s31} | |
35 ; DIS-NEXT: 0: ed2dea04 | |
36 ; IASM-NEXT: .byte 0x4 | |
37 ; IASM-NEXT: .byte 0xea | |
38 ; IASM-NEXT: .byte 0x2d | |
39 ; IASM-NEXT: .byte 0xed | |
40 | |
41 ; ASM-NEXT: push {lr} | |
42 ; DIS-NEXT: 4: e52de004 | |
43 ; IASM-NEXT: .byte 0x4 | |
44 ; IASM-NEXT: .byte 0xe0 | |
45 ; IASM-NEXT: .byte 0x2d | |
46 ; IASM-NEXT: .byte 0xe5 | |
47 | |
48 ; ASM-NEXT: sub sp, sp, #12 | |
49 ; DIS-NEXT: 8: e24dd00c | |
50 ; IASM-NEXT: .byte 0xc | |
51 ; IASM-NEXT: .byte 0xd0 | |
52 ; IASM-NEXT: .byte 0x4d | |
53 ; IASM-NEXT: .byte 0xe2 | |
54 | |
55 call void @foo() | |
John
2015/12/18 00:02:31
Move the call to line 65?
Karl
2015/12/18 16:26:51
Done.
| |
56 | |
57 ; ASM-NEXT: vmov.f64 d15, d0 | |
58 ; DIS-NEXT: c: eeb0fb40 | |
59 ; IASM-NEXT: vmov.f64 d15, d0 | |
60 | |
61 ; ASM-NEXT: vmov.f64 d14, d1 | |
62 ; DIS-NEXT: 10: eeb0eb41 | |
63 ; IASM-NEXT: vmov.f64 d14, d1 | |
64 | |
65 ; ASM-NEXT: bl foo | |
66 ; DIS-NEXT: 14: ebfffffe | |
67 ; IASM-NEXT: bl foo @ .word ebfffffe | |
68 | |
69 %res = fadd double %v1, %v2 | |
70 | |
71 ; ASM-NEXT: vadd.f64 d15, d15, d14 | |
72 ; DIS-NEXT: 18: ee3ffb0e | |
73 ; IASM-NEXT: vadd.f64 d15, d15, d14 | |
74 | |
75 ; ASM-NEXT: vmov.f64 d0, d15 | |
76 ; DIS-NEXT: 1c: eeb00b4f | |
77 ; IASM-NEXT: vmov.f64 d0, d15 | |
78 | |
79 ret double %res | |
80 | |
81 ; ASM-NEXT: add sp, sp, #12 | |
82 ; DIS-NEXT: 20: e28dd00c | |
83 ; IASM-NEXT: .byte 0xc | |
84 ; IASM-NEXT: .byte 0xd0 | |
85 ; IASM-NEXT: .byte 0x8d | |
86 ; IASM-NEXT: .byte 0xe2 | |
87 | |
88 ; ASM-NEXT: pop {lr} | |
89 ; ASM-NEXT: # lr = def.pseudo | |
90 ; DIS-NEXT: 24: e49de004 | |
91 ; IASM-NEXT: .byte 0x4 | |
92 ; IASM-NEXT: .byte 0xe0 | |
93 ; IASM-NEXT: .byte 0x9d | |
94 ; IASM-NEXT: .byte 0xe4 | |
95 | |
96 ; ASM-NEXT: vpop {s28, s29, s30, s31} | |
97 ; ASM-NEXT: # s28 = def.pseudo | |
98 ; ASM-NEXT: # s29 = def.pseudo | |
99 ; ASM-NEXT: # s30 = def.pseudo | |
100 ; ASM-NEXT: # s31 = def.pseudo | |
101 ; DIS-NEXT: 28: ecbdea04 | |
102 ; IASM-NEXT: .byte 0x4 | |
103 ; IASM-NEXT: .byte 0xea | |
104 ; IASM-NEXT: .byte 0xbd | |
105 ; IASM-NEXT: .byte 0xec | |
106 | |
107 ; ASM-NEXT: bx lr | |
108 ; DIS-NEXT: 2c: e12fff1e | |
109 ; IASM-NEXT: .byte 0x1e | |
110 ; IASM-NEXT: .byte 0xff | |
111 ; IASM-NEXT: .byte 0x2f | |
112 ; IASM-NEXT: .byte 0xe1 | |
113 | |
114 } | |
115 | |
116 define internal void @foo() { | |
117 ret void | |
118 } | |
OLD | NEW |