Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 ; Show that we know how to translate add. | |
|
Jim Stichnoth
2015/12/08 22:21:51
not add
Karl
2015/12/08 22:45:44
My cut and paste skills are getting worse! Fixed.
| |
| 2 | |
| 3 ; REQUIRES: allow_dump | |
| 4 | |
| 5 ; Compile using standalone assembler. | |
| 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ | |
| 7 ; RUN: | FileCheck %s --check-prefix=ASM | |
| 8 | |
| 9 ; Show bytes in assembled standalone code. | |
| 10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | |
| 11 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS | |
| 12 | |
| 13 ; Compile using integrated assembler. | |
| 14 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ | |
| 15 ; RUN: | FileCheck %s --check-prefix=IASM | |
| 16 | |
| 17 ; Show bytes in assembled integrated code. | |
| 18 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ | |
| 19 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS | |
| 20 | |
| 21 define internal i32 @_Z12icmp_zeroSgei(i32 %a) { | |
|
Jim Stichnoth
2015/12/08 22:21:51
Nit: how about a friendlier function name?
Karl
2015/12/08 22:45:44
Done.
| |
| 22 ; ASM-LABEL:_Z12icmp_zeroSgei: | |
| 23 ; DIS-LABEL:00000000 <_Z12icmp_zeroSgei>: | |
| 24 ; IASM-LABEL:_Z12icmp_zeroSgei: | |
| 25 | |
| 26 entry: | |
| 27 ; ASM-NEXT:.L_Z12icmp_zeroSgei$entry: | |
| 28 ; IASM-NEXT:.L_Z12icmp_zeroSgei$entry: | |
| 29 | |
| 30 ; ASM-NEXT: sub sp, sp, #12 | |
| 31 ; DIS-NEXT: 0: e24dd00c | |
| 32 ; IASM-NEXT: .byte 0xc | |
| 33 ; IASM-NEXT: .byte 0xd0 | |
| 34 ; IASM-NEXT: .byte 0x4d | |
| 35 ; IASM-NEXT: .byte 0xe2 | |
| 36 | |
| 37 ; ASM-NEXT: str r0, [sp, #8] | |
| 38 ; ASM-NEXT: # [sp, #8] = def.pseudo | |
| 39 ; DIS-NEXT: 4: e58d0008 | |
| 40 ; IASM-NEXT: .byte 0x8 | |
| 41 ; IASM-NEXT: .byte 0x0 | |
| 42 ; IASM-NEXT: .byte 0x8d | |
| 43 ; IASM-NEXT: .byte 0xe5 | |
| 44 | |
| 45 %cmp = icmp sgt i32 %a, -1 | |
| 46 | |
| 47 ; ASM-NEXT: mov r0, #0 | |
| 48 ; DIS-NEXT: 8: e3a00000 | |
| 49 ; IASM-NEXT: .byte 0x0 | |
| 50 ; IASM-NEXT: .byte 0x0 | |
| 51 ; IASM-NEXT: .byte 0xa0 | |
| 52 ; IASM-NEXT: .byte 0xe3 | |
| 53 | |
| 54 ; ASM-NEXT: ldr r1, [sp, #8] | |
| 55 ; DIS-NEXT: c: e59d1008 | |
| 56 ; IASM-NEXT: .byte 0x8 | |
| 57 ; IASM-NEXT: .byte 0x10 | |
| 58 ; IASM-NEXT: .byte 0x9d | |
| 59 ; IASM-NEXT: .byte 0xe5 | |
| 60 | |
| 61 ; ASM-NEXT: cmn r1, #1 | |
| 62 ; DIS-NEXT: 10: e3710001 | |
| 63 ; IASM-NEXT: .byte 0x1 | |
| 64 ; IASM-NEXT: .byte 0x0 | |
| 65 ; IASM-NEXT: .byte 0x71 | |
| 66 ; IASM-NEXT: .byte 0xe3 | |
| 67 | |
| 68 %cmp.ret_ext = zext i1 %cmp to i32 | |
| 69 ret i32 %cmp.ret_ext | |
| 70 } | |
| OLD | NEW |