| OLD | NEW |
| 1 ; Tests MVN instruction. | 1 ; Tests MVN instruction. |
| 2 | 2 |
| 3 ; REQUIRES: allow_dump | 3 ; REQUIRES: allow_dump |
| 4 | 4 |
| 5 ; Compile using standalone assembler. | 5 ; Compile using standalone assembler. |
| 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ | 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ |
| 7 ; RUN: | FileCheck %s --check-prefix=ASM | 7 ; RUN: | FileCheck %s --check-prefix=ASM |
| 8 | 8 |
| 9 ; Show bytes in assembled standalone code. | 9 ; Show bytes in assembled standalone code. |
| 10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | 10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 ; ASM-NEXT: and r0, r0, #1 | 62 ; ASM-NEXT: and r0, r0, #1 |
| 63 ; DIS-NEXT: 10: e2000001 | 63 ; DIS-NEXT: 10: e2000001 |
| 64 ; IASM-NEXT: .byte 0x1 | 64 ; IASM-NEXT: .byte 0x1 |
| 65 ; IASM-NEXT: .byte 0x0 | 65 ; IASM-NEXT: .byte 0x0 |
| 66 ; IASM-NEXT: .byte 0x0 | 66 ; IASM-NEXT: .byte 0x0 |
| 67 ; IASM-NEXT: .byte 0xe2 | 67 ; IASM-NEXT: .byte 0xe2 |
| 68 | 68 |
| 69 ; ASM-NEXT: strb r0, [sp, #12] | 69 ; ASM-NEXT: strb r0, [sp, #12] |
| 70 ; ASM-NEXT: # [sp, #12] = def.pseudo | 70 ; ASM-NEXT: # [sp, #12] = def.pseudo |
| 71 ; DIS-NEXT: 14: e5cd000c | 71 ; DIS-NEXT: 14: e5cd000c |
| 72 ; IASM-NEXT: strb r0, [sp, #12] | 72 ; IASM-NEXT: .byte 0xc |
| 73 ; IASM-NEXT: .byte 0x0 |
| 74 ; IASM-NEXT: .byte 0xcd |
| 75 ; IASM-NEXT: .byte 0xe5 |
| 73 | 76 |
| 74 %a.arg_trunc = trunc i32 %a to i1 | 77 %a.arg_trunc = trunc i32 %a to i1 |
| 75 | 78 |
| 76 ; ASM-NEXT: ldr r0, [sp, #20] | 79 ; ASM-NEXT: ldr r0, [sp, #20] |
| 77 ; DIS-NEXT: 18: e59d0014 | 80 ; DIS-NEXT: 18: e59d0014 |
| 78 ; IASM-NEXT: .byte 0x14 | 81 ; IASM-NEXT: .byte 0x14 |
| 79 ; IASM-NEXT: .byte 0x0 | 82 ; IASM-NEXT: .byte 0x0 |
| 80 ; IASM-NEXT: .byte 0x9d | 83 ; IASM-NEXT: .byte 0x9d |
| 81 ; IASM-NEXT: .byte 0xe5 | 84 ; IASM-NEXT: .byte 0xe5 |
| 82 | 85 |
| 83 ; ASM-NEXT: and r0, r0, #1 | 86 ; ASM-NEXT: and r0, r0, #1 |
| 84 ; DIS-NEXT: 1c: e2000001 | 87 ; DIS-NEXT: 1c: e2000001 |
| 85 ; IASM-NEXT: .byte 0x1 | 88 ; IASM-NEXT: .byte 0x1 |
| 86 ; IASM-NEXT: .byte 0x0 | 89 ; IASM-NEXT: .byte 0x0 |
| 87 ; IASM-NEXT: .byte 0x0 | 90 ; IASM-NEXT: .byte 0x0 |
| 88 ; IASM-NEXT: .byte 0xe2 | 91 ; IASM-NEXT: .byte 0xe2 |
| 89 | 92 |
| 90 ; ASM-NEXT: strb r0, [sp, #8] | 93 ; ASM-NEXT: strb r0, [sp, #8] |
| 91 ; ASM-NEXT: # [sp, #8] = def.pseudo | 94 ; ASM-NEXT: # [sp, #8] = def.pseudo |
| 92 ; DIS-NEXT: 20: e5cd0008 | 95 ; DIS-NEXT: 20: e5cd0008 |
| 93 ; IASM-NEXT: strb r0, [sp, #8] | 96 ; IASM-NEXT: .byte 0x8 |
| 97 ; IASM-NEXT: .byte 0x0 |
| 98 ; IASM-NEXT: .byte 0xcd |
| 99 ; IASM-NEXT: .byte 0xe5 |
| 94 | 100 |
| 95 %conv = zext i1 %a.arg_trunc to i32 | 101 %conv = zext i1 %a.arg_trunc to i32 |
| 96 | 102 |
| 97 ; ASM-NEXT: ldrb r0, [sp, #8] | 103 ; ASM-NEXT: ldrb r0, [sp, #8] |
| 98 ; DIS-NEXT: 24: e5dd0008 | 104 ; DIS-NEXT: 24: e5dd0008 |
| 99 ; IASM-NEXT: ldrb r0, [sp, #8] | 105 ; IASM-NEXT: .byte 0x8 |
| 106 ; IASM-NEXT: .byte 0x0 |
| 107 ; IASM-NEXT: .byte 0xdd |
| 108 ; IASM-NEXT: .byte 0xe5 |
| 100 | 109 |
| 101 ; ASM-NEXT: str r0, [sp, #4] | 110 ; ASM-NEXT: str r0, [sp, #4] |
| 102 ; ASM-NEXT: # [sp, #4] = def.pseudo | 111 ; ASM-NEXT: # [sp, #4] = def.pseudo |
| 103 ; DIS-NEXT: 28: e58d0004 | 112 ; DIS-NEXT: 28: e58d0004 |
| 104 ; IASM-NEXT: .byte 0x4 | 113 ; IASM-NEXT: .byte 0x4 |
| 105 ; IASM-NEXT: .byte 0x0 | 114 ; IASM-NEXT: .byte 0x0 |
| 106 ; IASM-NEXT: .byte 0x8d | 115 ; IASM-NEXT: .byte 0x8d |
| 107 ; IASM-NEXT: .byte 0xe5 | 116 ; IASM-NEXT: .byte 0xe5 |
| 108 | 117 |
| 109 %ignore = sext i1 %b.arg_trunc to i32 | 118 %ignore = sext i1 %b.arg_trunc to i32 |
| 110 | 119 |
| 111 ; ASM-NEXT: mov r0, #0 | 120 ; ASM-NEXT: mov r0, #0 |
| 112 ; DIS-NEXT: 2c: e3a00000 | 121 ; DIS-NEXT: 2c: e3a00000 |
| 113 ; IASM-NEXT: .byte 0x0 | 122 ; IASM-NEXT: .byte 0x0 |
| 114 ; IASM-NEXT: .byte 0x0 | 123 ; IASM-NEXT: .byte 0x0 |
| 115 ; IASM-NEXT: .byte 0xa0 | 124 ; IASM-NEXT: .byte 0xa0 |
| 116 ; IASM-NEXT: .byte 0xe3 | 125 ; IASM-NEXT: .byte 0xe3 |
| 117 | 126 |
| 118 ; ASM-NEXT: ldrb r1, [sp, #12] | 127 ; ASM-NEXT: ldrb r1, [sp, #12] |
| 119 ; DIS-NEXT: 30: e5dd100c | 128 ; DIS-NEXT: 30: e5dd100c |
| 120 ; IASM-NEXT: ldrb r1, [sp, #12] | 129 ; IASM-NEXT: .byte 0xc |
| 130 ; IASM-NEXT: .byte 0x10 |
| 131 ; IASM-NEXT: .byte 0xdd |
| 132 ; IASM-NEXT: .byte 0xe5 |
| 121 | 133 |
| 122 ; ASM-NEXT: tst r1, #1 | 134 ; ASM-NEXT: tst r1, #1 |
| 123 ; DIS-NEXT: 34: e3110001 | 135 ; DIS-NEXT: 34: e3110001 |
| 124 ; IASM-NEXT: .byte 0x1 | 136 ; IASM-NEXT: .byte 0x1 |
| 125 ; IASM-NEXT: .byte 0x0 | 137 ; IASM-NEXT: .byte 0x0 |
| 126 ; IASM-NEXT: .byte 0x11 | 138 ; IASM-NEXT: .byte 0x11 |
| 127 ; IASM-NEXT: .byte 0xe3 | 139 ; IASM-NEXT: .byte 0xe3 |
| 128 | 140 |
| 129 ; ********* Use of MVN ******** | 141 ; ********* Use of MVN ******** |
| 130 ; ASM-NEXT: mvn r1, #0 | 142 ; ASM-NEXT: mvn r1, #0 |
| 131 ; DIS-NEXT: 38: e3e01000 | 143 ; DIS-NEXT: 38: e3e01000 |
| 132 ; IASM-NEXT: .byte 0x0 | 144 ; IASM-NEXT: .byte 0x0 |
| 133 ; IASM-NEXT: .byte 0x10 | 145 ; IASM-NEXT: .byte 0x10 |
| 134 ; IASM-NEXT: .byte 0xe0 | 146 ; IASM-NEXT: .byte 0xe0 |
| 135 ; IASM-NEXT: .byte 0xe3 | 147 ; IASM-NEXT: .byte 0xe3 |
| 136 | 148 |
| 137 ; ASM-NEXT: movne r0, r1 | 149 ; ASM-NEXT: movne r0, r1 |
| 138 ; DIS-NEXT: 3c: 11a00001 | 150 ; DIS-NEXT: 3c: 11a00001 |
| 139 ; IASM-NEXT: .byte 0x1 | 151 ; IASM-NEXT: .byte 0x1 |
| 140 ; IASM-NEXT: .byte 0x0 | 152 ; IASM-NEXT: .byte 0x0 |
| 141 ; IASM-NEXT: .byte 0xa0 | 153 ; IASM-NEXT: .byte 0xa0 |
| 142 ; IASM-NEXT: .byte 0x11 | 154 ; IASM-NEXT: .byte 0x11 |
| 143 | 155 |
| 144 ret void | 156 ret void |
| 145 } | 157 } |
| OLD | NEW |