OLD | NEW |
1 ; Test that we handle cmp (register) and cmp (immediate). | 1 ; Test that we handle cmp (register) and cmp (immediate). |
2 | 2 |
3 ; REQUIRES: allow_dump | 3 ; REQUIRES: allow_dump |
4 | 4 |
5 ; Compile using standalone assembler. | 5 ; Compile using standalone assembler. |
6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ | 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ |
7 ; RUN: | FileCheck %s --check-prefix=ASM | 7 ; RUN: | FileCheck %s --check-prefix=ASM |
8 | 8 |
9 ; Show bytes in assembled standalone code. | 9 ; Show bytes in assembled standalone code. |
10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | 10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
(...skipping 21 matching lines...) Expand all Loading... |
32 %a.arg_trunc = trunc i32 %a to i8 | 32 %a.arg_trunc = trunc i32 %a to i8 |
33 | 33 |
34 ; ASM-NEXT: sub sp, sp, #24 | 34 ; ASM-NEXT: sub sp, sp, #24 |
35 ; DIS-NEXT: 0: e24dd018 | 35 ; DIS-NEXT: 0: e24dd018 |
36 ; IASM-NEXT: .byte 0x18 | 36 ; IASM-NEXT: .byte 0x18 |
37 ; IASM-NEXT: .byte 0xd0 | 37 ; IASM-NEXT: .byte 0xd0 |
38 ; IASM-NEXT: .byte 0x4d | 38 ; IASM-NEXT: .byte 0x4d |
39 ; IASM-NEXT: .byte 0xe2 | 39 ; IASM-NEXT: .byte 0xe2 |
40 | 40 |
41 ; ASM-NEXT: str r0, [sp, #20] | 41 ; ASM-NEXT: str r0, [sp, #20] |
42 ; ASM-NEXT: # [sp, #20] = def.pseudo | 42 ; ASM-NEXT: # [sp, #20] = def.pseudo |
43 ; DIS-NEXT: 4: e58d0014 | 43 ; DIS-NEXT: 4: e58d0014 |
44 ; IASM-NEXT: .byte 0x14 | 44 ; IASM-NEXT: .byte 0x14 |
45 ; IASM-NEXT: .byte 0x0 | 45 ; IASM-NEXT: .byte 0x0 |
46 ; IASM-NEXT: .byte 0x8d | 46 ; IASM-NEXT: .byte 0x8d |
47 ; IASM-NEXT: .byte 0xe5 | 47 ; IASM-NEXT: .byte 0xe5 |
48 | 48 |
49 ; ASM-NEXT: str r1, [sp, #16] | 49 ; ASM-NEXT: str r1, [sp, #16] |
50 ; ASM-NEXT: # [sp, #16] = def.pseudo | 50 ; ASM-NEXT: # [sp, #16] = def.pseudo |
51 ; DIS-NEXT: 8: e58d1010 | 51 ; DIS-NEXT: 8: e58d1010 |
52 ; IASM-NEXT: .byte 0x10 | 52 ; IASM-NEXT: .byte 0x10 |
53 ; IASM-NEXT: .byte 0x10 | 53 ; IASM-NEXT: .byte 0x10 |
54 ; IASM-NEXT: .byte 0x8d | 54 ; IASM-NEXT: .byte 0x8d |
55 ; IASM-NEXT: .byte 0xe5 | 55 ; IASM-NEXT: .byte 0xe5 |
56 | 56 |
57 ; ASM-NEXT: ldr r0, [sp, #16] | 57 ; ASM-NEXT: ldr r0, [sp, #16] |
58 ; DIS-NEXT: c: e59d0010 | 58 ; DIS-NEXT: c: e59d0010 |
59 ; IASM-NEXT: .byte 0x10 | 59 ; IASM-NEXT: .byte 0x10 |
60 ; IASM-NEXT: .byte 0x0 | 60 ; IASM-NEXT: .byte 0x0 |
61 ; IASM-NEXT: .byte 0x9d | 61 ; IASM-NEXT: .byte 0x9d |
62 ; IASM-NEXT: .byte 0xe5 | 62 ; IASM-NEXT: .byte 0xe5 |
63 | 63 |
64 ; ASM-NEXT: strb r0, [sp, #12] | 64 ; ASM-NEXT: strb r0, [sp, #12] |
65 ; ASM-NEXT: # [sp, #12] = def.pseudo | 65 ; ASM-NEXT: # [sp, #12] = def.pseudo |
66 ; DIS-NEXT: 10: e5cd000c | 66 ; DIS-NEXT: 10: e5cd000c |
67 ; IASM-NEXT: .byte 0xc | 67 ; IASM-NEXT: .byte 0xc |
68 ; IASM-NEXT: .byte 0x0 | 68 ; IASM-NEXT: .byte 0x0 |
69 ; IASM-NEXT: .byte 0xcd | 69 ; IASM-NEXT: .byte 0xcd |
70 ; IASM-NEXT: .byte 0xe5 | 70 ; IASM-NEXT: .byte 0xe5 |
71 | 71 |
72 ; ASM-NEXT: ldr r0, [sp, #20] | 72 ; ASM-NEXT: ldr r0, [sp, #20] |
73 ; DIS-NEXT: 14: e59d0014 | 73 ; DIS-NEXT: 14: e59d0014 |
74 ; IASM-NEXT: .byte 0x14 | 74 ; IASM-NEXT: .byte 0x14 |
75 ; IASM-NEXT: .byte 0x0 | 75 ; IASM-NEXT: .byte 0x0 |
76 ; IASM-NEXT: .byte 0x9d | 76 ; IASM-NEXT: .byte 0x9d |
77 ; IASM-NEXT: .byte 0xe5 | 77 ; IASM-NEXT: .byte 0xe5 |
78 | 78 |
79 ; ASM-NEXT: strb r0, [sp, #8] | 79 ; ASM-NEXT: strb r0, [sp, #8] |
80 ; ASM-NEXT: # [sp, #8] = def.pseudo | 80 ; ASM-NEXT: # [sp, #8] = def.pseudo |
81 ; DIS-NEXT: 18: e5cd0008 | 81 ; DIS-NEXT: 18: e5cd0008 |
82 ; IASM-NEXT: .byte 0x8 | 82 ; IASM-NEXT: .byte 0x8 |
83 ; IASM-NEXT: .byte 0x0 | 83 ; IASM-NEXT: .byte 0x0 |
84 ; IASM-NEXT: .byte 0xcd | 84 ; IASM-NEXT: .byte 0xcd |
85 ; IASM-NEXT: .byte 0xe5 | 85 ; IASM-NEXT: .byte 0xe5 |
86 | 86 |
87 ; ASM-NEXT: mov r0, #0 | 87 ; ASM-NEXT: mov r0, #0 |
88 ; DIS-NEXT: 1c: e3a00000 | 88 ; DIS-NEXT: 1c: e3a00000 |
89 ; IASM-NEXT: .byte 0x0 | 89 ; IASM-NEXT: .byte 0x0 |
90 ; IASM-NEXT: .byte 0x0 | 90 ; IASM-NEXT: .byte 0x0 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 ; IASM-NEXT:.LcmpEqI32$entry: | 137 ; IASM-NEXT:.LcmpEqI32$entry: |
138 | 138 |
139 ; ASM-NEXT: sub sp, sp, #16 | 139 ; ASM-NEXT: sub sp, sp, #16 |
140 ; DIS-NEXT: 50: e24dd010 | 140 ; DIS-NEXT: 50: e24dd010 |
141 ; IASM-NEXT: .byte 0x10 | 141 ; IASM-NEXT: .byte 0x10 |
142 ; IASM-NEXT: .byte 0xd0 | 142 ; IASM-NEXT: .byte 0xd0 |
143 ; IASM-NEXT: .byte 0x4d | 143 ; IASM-NEXT: .byte 0x4d |
144 ; IASM-NEXT: .byte 0xe2 | 144 ; IASM-NEXT: .byte 0xe2 |
145 | 145 |
146 ; ASM-NEXT: str r0, [sp, #12] | 146 ; ASM-NEXT: str r0, [sp, #12] |
147 ; ASM-NEXT: # [sp, #12] = def.pseudo | 147 ; ASM-NEXT: # [sp, #12] = def.pseudo |
148 ; DIS-NEXT: 54: e58d000c | 148 ; DIS-NEXT: 54: e58d000c |
149 ; IASM-NEXT: .byte 0xc | 149 ; IASM-NEXT: .byte 0xc |
150 ; IASM-NEXT: .byte 0x0 | 150 ; IASM-NEXT: .byte 0x0 |
151 ; IASM-NEXT: .byte 0x8d | 151 ; IASM-NEXT: .byte 0x8d |
152 ; IASM-NEXT: .byte 0xe5 | 152 ; IASM-NEXT: .byte 0xe5 |
153 | 153 |
154 ; ASM-NEXT: str r1, [sp, #8] | 154 ; ASM-NEXT: str r1, [sp, #8] |
155 ; ASM-NEXT: # [sp, #8] = def.pseudo | 155 ; ASM-NEXT: # [sp, #8] = def.pseudo |
156 ; DIS-NEXT: 58: e58d1008 | 156 ; DIS-NEXT: 58: e58d1008 |
157 ; IASM-NEXT: .byte 0x8 | 157 ; IASM-NEXT: .byte 0x8 |
158 ; IASM-NEXT: .byte 0x10 | 158 ; IASM-NEXT: .byte 0x10 |
159 ; IASM-NEXT: .byte 0x8d | 159 ; IASM-NEXT: .byte 0x8d |
160 ; IASM-NEXT: .byte 0xe5 | 160 ; IASM-NEXT: .byte 0xe5 |
161 | 161 |
162 ; ASM-NEXT: mov r0, #0 | 162 ; ASM-NEXT: mov r0, #0 |
163 ; DIS-NEXT: 5c: e3a00000 | 163 ; DIS-NEXT: 5c: e3a00000 |
164 ; IASM-NEXT: .byte 0x0 | 164 ; IASM-NEXT: .byte 0x0 |
165 ; IASM-NEXT: .byte 0x0 | 165 ; IASM-NEXT: .byte 0x0 |
(...skipping 21 matching lines...) Expand all Loading... |
187 ; ASM-NEXT: cmp r1, r2 | 187 ; ASM-NEXT: cmp r1, r2 |
188 ; DIS-NEXT: 68: e1510002 | 188 ; DIS-NEXT: 68: e1510002 |
189 ; IASM-NEXT: .byte 0x2 | 189 ; IASM-NEXT: .byte 0x2 |
190 ; IASM-NEXT: .byte 0x0 | 190 ; IASM-NEXT: .byte 0x0 |
191 ; IASM-NEXT: .byte 0x51 | 191 ; IASM-NEXT: .byte 0x51 |
192 ; IASM-NEXT: .byte 0xe1 | 192 ; IASM-NEXT: .byte 0xe1 |
193 | 193 |
194 %cmp.ret_ext = zext i1 %cmp to i32 | 194 %cmp.ret_ext = zext i1 %cmp to i32 |
195 ret i32 %cmp.ret_ext | 195 ret i32 %cmp.ret_ext |
196 } | 196 } |
OLD | NEW |