OLD | NEW |
(Empty) | |
| 1 ; Show that we know how to translate add. |
| 2 ; TODO(kschimpf) Currently only know how to test add 1 to R0. |
| 3 |
| 4 ; NOTE: We use -O2 to get rid of memory stores. |
| 5 |
| 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ |
| 7 ; RUN: | FileCheck %s --check-prefix=ASM |
| 8 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ |
| 9 ; RUN: | FileCheck %s --check-prefix=IASM |
| 10 |
| 11 define internal i32 @add1ToR0(i32 %p) { |
| 12 %v = add i32 %p, 1 |
| 13 ret i32 %v |
| 14 } |
| 15 |
| 16 ; ASM-LABEL: add1ToR0: |
| 17 ; ASM: add r0, r0, #1 |
| 18 ; ASM: bx lr |
| 19 |
| 20 ; IASM-LABEL: add1ToR0: |
| 21 ; IASM: .byte 0x1 |
| 22 ; IASM-NEXT: .byte 0x0 |
| 23 ; IASM-NEXT: .byte 0x80 |
| 24 ; IASM-NEXT: .byte 0xe2 |
| 25 |
OLD | NEW |