OLD | NEW |
1 ; Test that functions are aligned to the NaCl bundle alignment. | 1 ; Test that functions are aligned to the NaCl bundle alignment. |
2 ; We could be smarter and only do this for indirect call targets | 2 ; We could be smarter and only do this for indirect call targets |
3 ; but typically you want to align functions anyway. | 3 ; but typically you want to align functions anyway. |
4 ; Also, we are currently using hlts for non-executable padding. | 4 ; Also, we are currently using hlts for non-executable padding. |
5 | 5 |
6 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s | 6 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s |
7 | 7 |
8 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) | 8 ; RUN: %if --need=target_ARM32 \ |
9 ; once enough infrastructure is in. Also, switch to --filetype=obj | 9 ; RUN: --command %p2i --filetype=obj \ |
10 ; when possible. | 10 ; RUN: --disassemble --target arm32 -i %s --args -O2 \ |
11 ; RUN: %if --need=target_ARM32 --need=allow_dump \ | 11 ; RUN: | %if --need=target_ARM32 \ |
12 ; RUN: --command %p2i --filetype=asm --assemble \ | |
13 ; RUN: --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \ | |
14 ; RUN: | %if --need=target_ARM32 --need=allow_dump \ | |
15 ; RUN: --command FileCheck --check-prefix ARM32 %s | 12 ; RUN: --command FileCheck --check-prefix ARM32 %s |
16 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ | 13 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ |
17 ; RUN: --command %p2i --filetype=asm --assemble \ | 14 ; RUN: --command %p2i --filetype=asm --assemble \ |
18 ; RUN: --disassemble --target mips32 -i %s --args -O2 --skip-unimplemented \ | 15 ; RUN: --disassemble --target mips32 -i %s --args -O2 --skip-unimplemented \ |
19 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \ | 16 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \ |
20 ; RUN: --command FileCheck --check-prefix MIPS32 %s | 17 ; RUN: --command FileCheck --check-prefix MIPS32 %s |
21 | 18 |
22 define internal void @foo() { | 19 define internal void @foo() { |
23 ret void | 20 ret void |
24 } | 21 } |
(...skipping 12 matching lines...) Loading... |
37 define internal void @bar() { | 34 define internal void @bar() { |
38 ret void | 35 ret void |
39 } | 36 } |
40 ; CHECK-LABEL: bar | 37 ; CHECK-LABEL: bar |
41 ; CHECK-NEXT: 20: {{.*}} ret | 38 ; CHECK-NEXT: 20: {{.*}} ret |
42 ; ARM32-LABEL: bar | 39 ; ARM32-LABEL: bar |
43 ; ARM32-NEXT: 10: {{.*}} bx lr | 40 ; ARM32-NEXT: 10: {{.*}} bx lr |
44 ; MIPS32-LABEL: bar | 41 ; MIPS32-LABEL: bar |
45 ; MIPS32: 10: {{.*}} jr ra | 42 ; MIPS32: 10: {{.*}} jr ra |
46 ; MIPS32-NEXT: 14: {{.*}} nop | 43 ; MIPS32-NEXT: 14: {{.*}} nop |
OLD | NEW |