OLD | NEW |
1 ; Simple test that returns various immediates. For fixed-width instruction | 1 ; Simple test that returns various immediates. For fixed-width instruction |
2 ; sets, some immediates are more complicated than others. | 2 ; sets, some immediates are more complicated than others. |
3 ; For x86-32, it shouldn't be a problem. | 3 ; For x86-32, it shouldn't be a problem. |
4 | 4 |
5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s | 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s |
6 | 6 |
7 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) | 7 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) |
8 ; once enough infrastructure is in. Also, switch to --filetype=obj | 8 ; once enough infrastructure is in. Also, switch to --filetype=obj |
9 ; when possible. | 9 ; when possible. |
10 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ | 10 ; RUN: %if --need=target_ARM32 --need=allow_dump \ |
| 11 ; RUN: --command %p2i --filetype=asm --assemble \ |
11 ; RUN: --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \ | 12 ; RUN: --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \ |
12 ; RUN: | %if --need=target_ARM32 --command FileCheck --check-prefix ARM32 %s | 13 ; RUN: | %if --need=target_ARM32 --need=allow_dump \ |
| 14 ; RUN: --command FileCheck --check-prefix ARM32 %s |
13 | 15 |
14 ; Test 8-bits of all ones rotated right by various amounts (even vs odd). | 16 ; Test 8-bits of all ones rotated right by various amounts (even vs odd). |
15 ; ARM has a shifter that allows encoding 8-bits rotated right by even amounts. | 17 ; ARM has a shifter that allows encoding 8-bits rotated right by even amounts. |
16 ; The first few "rotate right" test cases are expressed as shift-left. | 18 ; The first few "rotate right" test cases are expressed as shift-left. |
17 | 19 |
18 define i32 @ret_8bits_shift_left0() { | 20 define i32 @ret_8bits_shift_left0() { |
19 ret i32 255 | 21 ret i32 255 |
20 } | 22 } |
21 ; CHECK-LABEL: ret_8bits_shift_left0 | 23 ; CHECK-LABEL: ret_8bits_shift_left0 |
22 ; CHECK-NEXT: mov eax,0xff | 24 ; CHECK-NEXT: mov eax,0xff |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 238 |
237 define i32 @ret_addr() { | 239 define i32 @ret_addr() { |
238 %ptr = ptrtoint void ()* @_start to i32 | 240 %ptr = ptrtoint void ()* @_start to i32 |
239 ret i32 %ptr | 241 ret i32 %ptr |
240 } | 242 } |
241 ; CHECK-LABEL: ret_addr | 243 ; CHECK-LABEL: ret_addr |
242 ; CHECK-NEXT: mov eax,0x0 {{.*}} R_386_32 _start | 244 ; CHECK-NEXT: mov eax,0x0 {{.*}} R_386_32 _start |
243 ; ARM32-LABEL: ret_addr | 245 ; ARM32-LABEL: ret_addr |
244 ; ARM32-NEXT: movw r0, #0 {{.*}} R_ARM_MOVW_ABS_NC _start | 246 ; ARM32-NEXT: movw r0, #0 {{.*}} R_ARM_MOVW_ABS_NC _start |
245 ; ARM32-NEXT: movt r0, #0 {{.*}} R_ARM_MOVT_ABS _start | 247 ; ARM32-NEXT: movt r0, #0 {{.*}} R_ARM_MOVT_ABS _start |
OLD | NEW |