| OLD | NEW |
| 1 ; Show that we know how to translate rsb. Uses shl as example, because it | 1 ; Show that we know how to translate rsb. Uses shl as example, because it |
| 2 ; uses rsb for type i64 | 2 ; uses rsb for type i64. |
| 3 |
| 4 ; Also shows an example of a register-shifted register (data) operation. |
| 3 | 5 |
| 4 ; REQUIRES: allow_dump | 6 ; REQUIRES: allow_dump |
| 5 | 7 |
| 6 ; Compile using standalone assembler. | 8 ; Compile using standalone assembler. |
| 7 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ | 9 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ |
| 8 ; RUN: | FileCheck %s --check-prefix=ASM | 10 ; RUN: | FileCheck %s --check-prefix=ASM |
| 9 | 11 |
| 10 ; Show bytes in assembled standalone code. | 12 ; Show bytes in assembled standalone code. |
| 11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | 13 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
| 12 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS | 14 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 ; IASM-NEXT: .byte 0xe5 | 114 ; IASM-NEXT: .byte 0xe5 |
| 113 | 115 |
| 114 ; ****** Here is the example of rsb ***** | 116 ; ****** Here is the example of rsb ***** |
| 115 ; ASM-NEXT: rsb r3, r2, #32 | 117 ; ASM-NEXT: rsb r3, r2, #32 |
| 116 ; DIS-NEXT: 2c: e2623020 | 118 ; DIS-NEXT: 2c: e2623020 |
| 117 ; IASM-NEXT: .byte 0x20 | 119 ; IASM-NEXT: .byte 0x20 |
| 118 ; IASM-NEXT: .byte 0x30 | 120 ; IASM-NEXT: .byte 0x30 |
| 119 ; IASM-NEXT: .byte 0x62 | 121 ; IASM-NEXT: .byte 0x62 |
| 120 ; IASM-NEXT: .byte 0xe2 | 122 ; IASM-NEXT: .byte 0xe2 |
| 121 | 123 |
| 124 ; ASM-NEXT: lsr r3, r0, r3 |
| 125 ; DIS-NEXT: 30: e1a03330 |
| 126 ; IASM-NEXT: .byte 0x30 |
| 127 ; IASM-NEXT: .byte 0x33 |
| 128 ; IASM-NEXT: .byte 0xa0 |
| 129 ; IASM-NEXT: .byte 0xe1 |
| 130 |
| 131 ; ***** Here is an example of a register-shifted register ***** |
| 132 ; ASM-NEXT: orr r1, r3, r1, lsl r2 |
| 133 ; DIS-NEXT: 34: e1831211 |
| 134 ; IASM-NEXT: .byte 0x11 |
| 135 ; IASM-NEXT: .byte 0x12 |
| 136 ; IASM-NEXT: .byte 0x83 |
| 137 ; IASM-NEXT: .byte 0xe1 |
| 138 |
| 122 ret i64 %result | 139 ret i64 %result |
| 123 } | 140 } |
| OLD | NEW |