| OLD | NEW |
| 1 ; Show that we know how to translate add. | 1 ; Show that we know how to translate add. |
| 2 | 2 |
| 3 ; NOTE: We use -O2 to get rid of memory stores. | 3 ; NOTE: We use -O2 to get rid of memory stores. |
| 4 | 4 |
| 5 ; REQUIRES: allow_dump | 5 ; REQUIRES: allow_dump |
| 6 | 6 |
| 7 ; Compile using standalone assembler. | 7 ; Compile using standalone assembler. |
| 8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ | 8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ |
| 9 ; RUN: | FileCheck %s --check-prefix=ASM | 9 ; RUN: | FileCheck %s --check-prefix=ASM |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 ; IASM-NEXT: .LAdd2Regs$__0: | 64 ; IASM-NEXT: .LAdd2Regs$__0: |
| 65 ; IASM-NEXT: .byte 0x1 | 65 ; IASM-NEXT: .byte 0x1 |
| 66 ; IASM-NEXT: .byte 0x0 | 66 ; IASM-NEXT: .byte 0x0 |
| 67 ; IASM-NEXT: .byte 0x80 | 67 ; IASM-NEXT: .byte 0x80 |
| 68 ; IASM-NEXT: .byte 0xe0 | 68 ; IASM-NEXT: .byte 0xe0 |
| 69 | 69 |
| 70 ; IASM-NEXT: .byte 0x1e | 70 ; IASM-NEXT: .byte 0x1e |
| 71 ; IASM-NEXT: .byte 0xff | 71 ; IASM-NEXT: .byte 0xff |
| 72 ; IASM-NEXT: .byte 0x2f | 72 ; IASM-NEXT: .byte 0x2f |
| 73 ; IASM-NEXT: .byte 0xe1 | 73 ; IASM-NEXT: .byte 0xe1 |
| 74 |
| 75 define internal i64 @addI64ToR0R1(i64 %p) { |
| 76 %v = add i64 %p, 1 |
| 77 ret i64 %v |
| 78 } |
| 79 |
| 80 ; ASM-LABEL:addI64ToR0R1: |
| 81 ; ASM-NEXT:.LaddI64ToR0R1$__0: |
| 82 ; ASM-NEXT: adds r0, r0, #1 |
| 83 ; ASM-NEXT: adc r1, r1, #0 |
| 84 |
| 85 ; DIS-LABEL:00000020 <addI64ToR0R1>: |
| 86 ; DIS-NEXT: 20: e2900001 |
| 87 ; DIS-NEXT: 24: e2a11000 |
| 88 |
| 89 ; IASM-LABEL:addI64ToR0R1: |
| 90 ; IASM-NEXT:.LaddI64ToR0R1$__0: |
| 91 ; IASM-NEXT: .byte 0x1 |
| 92 ; IASM-NEXT: .byte 0x0 |
| 93 ; IASM-NEXT: .byte 0x90 |
| 94 ; IASM-NEXT: .byte 0xe2 |
| 95 ; IASM-NEXT: .byte 0x0 |
| 96 ; IASM-NEXT: .byte 0x10 |
| 97 ; IASM-NEXT: .byte 0xa1 |
| 98 ; IASM-NEXT: .byte 0xe2 |
| OLD | NEW |