Chromium Code Reviews| 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 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) |
| 9 ; once enough infrastructure is in. Also, switch to --filetype=obj | 9 ; once enough infrastructure is in. Also, switch to --filetype=obj |
| 10 ; when possible. | 10 ; when possible. |
| 11 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ | 11 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ |
| 12 ; RUN: --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \ | 12 ; RUN: --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \ |
| 13 ; RUN: | %if --need=target_ARM32 --command FileCheck --check-prefix ARM32 %s | 13 ; RUN: | %if --need=target_ARM32 --command FileCheck --check-prefix ARM32 %s |
| 14 ; RUN: %if --need=target_MIPS32 --command %p2i --filetype=asm --assemble \ | |
| 15 ; RUN: --disassemble --target mips32 -i %s --args -O2 --skip-unimplemented \ | |
| 16 ; RUN: | %if --need=target_MIPS32 --command FileCheck --check-prefix MIPS32 %s | |
| 14 | 17 |
| 15 define void @foo() { | 18 define void @foo() { |
| 16 ret void | 19 ret void |
| 17 } | 20 } |
| 18 ; CHECK-LABEL: foo | 21 ; CHECK-LABEL: foo |
| 19 ; CHECK-NEXT: 0: {{.*}} ret | 22 ; CHECK-NEXT: 0: {{.*}} ret |
| 20 ; CHECK-NEXT: 1: {{.*}} hlt | 23 ; CHECK-NEXT: 1: {{.*}} hlt |
| 21 ; ARM32-LABEL: foo | 24 ; ARM32-LABEL: foo |
| 22 ; ARM32-NEXT: 0: {{.*}} bx lr | 25 ; ARM32-NEXT: 0: {{.*}} bx lr |
| 23 ; ARM32-NEXT: 4: e7fedef0 udf | 26 ; ARM32-NEXT: 4: e7fedef0 udf |
| 24 ; ARM32-NEXT: 8: e7fedef0 udf | 27 ; ARM32-NEXT: 8: e7fedef0 udf |
| 25 ; ARM32-NEXT: c: e7fedef0 udf | 28 ; ARM32-NEXT: c: e7fedef0 udf |
| 29 ; TODO (Reed Kotler check this disassembly, .s file looks fine) | |
| 30 ; MIPS32-LABEL: foo | |
| 31 ; MIPS32: 4: {{.*}} jr ra | |
| 32 ; MIPS32-NEXT: 8: {{.*}} nop | |
| 33 ; MIPS32-NEXT: c: e7fedef0 | |
| 26 | 34 |
| 27 define void @bar() { | 35 define void @bar() { |
| 28 ret void | 36 ret void |
| 29 } | 37 } |
| 30 ; CHECK-LABEL: bar | 38 ; CHECK-LABEL: bar |
| 31 ; CHECK-NEXT: 20: {{.*}} ret | 39 ; CHECK-NEXT: 20: {{.*}} ret |
| 32 ; ARM32-LABEL: bar | 40 ; ARM32-LABEL: bar |
| 33 ; ARM32-NEXT: 10: {{.*}} bx lr | 41 ; ARM32-NEXT: 10: {{.*}} bx lr |
| 42 ; TOOD (Reed Kotler check this disassembly, .s file looks fine) | |
|
jvoung (off chromium)
2015/06/12 19:39:13
TODO(reed kotler)
| |
| 43 ; MIPS32-LABEL: bar | |
| 44 ; MIPS32: 14: {{.*}} jr ra | |
| 45 ; MIPS32-NEXT: 18: {{.*}} nop | |
| OLD | NEW |