| OLD | NEW |
| (Empty) | |
| 1 ; Show that we handle constants in a movw, when it isn't represented as |
| 2 ; ConstantRelocatable (see mov-imm.ll for the ConstantRelocatable case). |
| 3 |
| 4 ; REQUIRES: allow_dump |
| 5 |
| 6 ; Compile using standalone assembler. |
| 7 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ |
| 8 ; RUN: --test-stack-extra 4084 | FileCheck %s --check-prefix=ASM |
| 9 |
| 10 ; Show bytes in assembled standalone code. |
| 11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
| 12 ; RUN: --args -Om1 --test-stack-extra 4084 | FileCheck %s --check-prefix=DIS |
| 13 |
| 14 ; Compile using integrated assembler. |
| 15 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 -unsafe-ias \ |
| 16 ; RUN: --test-stack-extra 4084 | FileCheck %s --check-prefix=IASM |
| 17 |
| 18 ; Show bytes in assembled integrated code. |
| 19 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ |
| 20 ; RUN: --args -Om1 -unsafe-ias --test-stack-extra 4084 \ |
| 21 ; RUN: | FileCheck %s --check-prefix=DIS |
| 22 |
| 23 define internal i32 @foo(i32 %x) { |
| 24 entry: |
| 25 |
| 26 ; ASM-LABEL: foo: |
| 27 ; ASM-NEXT: .Lfoo$entry: |
| 28 ; ******* Movw case to check ******* |
| 29 ; ASM-NEXT: movw ip, #4092 |
| 30 ; ASM-NEXT: sub sp, sp, ip |
| 31 ; ASM-NEXT: str r0, [sp, #4088] |
| 32 |
| 33 ; DIS-LABEL: 00000000 <foo>: |
| 34 ; DIS-NEXT: 0: e300cffc |
| 35 ; DIS-NEXT: 4: e04dd00c |
| 36 ; DIS-NEXT: 8: e58d0ff8 |
| 37 |
| 38 ; IASM-LABEL: foo: |
| 39 ; IASM-NEXT: .Lfoo$entry: |
| 40 |
| 41 ; IASM-NEXT: .byte 0xfc |
| 42 ; IASM-NEXT: .byte 0xcf |
| 43 ; IASM-NEXT: .byte 0x0 |
| 44 ; IASM-NEXT: .byte 0xe3 |
| 45 |
| 46 ; IASM-NEXT: .byte 0xc |
| 47 ; IASM-NEXT: .byte 0xd0 |
| 48 ; IASM-NEXT: .byte 0x4d |
| 49 ; IASM-NEXT: .byte 0xe0 |
| 50 |
| 51 ; IASM-NEXT: .byte 0xf8 |
| 52 ; IASM-NEXT: .byte 0xf |
| 53 ; IASM-NEXT: .byte 0x8d |
| 54 ; IASM-NEXT: .byte 0xe5 |
| 55 |
| 56 %mul = mul i32 %x, %x |
| 57 |
| 58 ; ASM-NEXT: ldr r0, [sp, #4088] |
| 59 ; ASM-NEXT: ldr r1, [sp, #4088] |
| 60 ; ASM-NEXT: mul r0, r0, r1 |
| 61 ; ASM-NEXT: str r0, [sp, #4084] |
| 62 |
| 63 ; DIS-NEXT: c: e59d0ff8 |
| 64 ; DIS-NEXT: 10: e59d1ff8 |
| 65 ; DIS-NEXT: 14: e0000190 |
| 66 ; DIS-NEXT: 18: e58d0ff4 |
| 67 |
| 68 ; IASM-NEXT: .byte 0xf8 |
| 69 ; IASM-NEXT: .byte 0xf |
| 70 ; IASM-NEXT: .byte 0x9d |
| 71 ; IASM-NEXT: .byte 0xe5 |
| 72 |
| 73 ; IASM-NEXT: .byte 0xf8 |
| 74 ; IASM-NEXT: .byte 0x1f |
| 75 ; IASM-NEXT: .byte 0x9d |
| 76 ; IASM-NEXT: .byte 0xe5 |
| 77 |
| 78 ; IASM-NEXT: .byte 0x90 |
| 79 ; IASM-NEXT: .byte 0x1 |
| 80 ; IASM-NEXT: .byte 0x0 |
| 81 ; IASM-NEXT: .byte 0xe0 |
| 82 |
| 83 ; IASM-NEXT: .byte 0xf4 |
| 84 ; IASM-NEXT: .byte 0xf |
| 85 ; IASM-NEXT: .byte 0x8d |
| 86 ; IASM-NEXT: .byte 0xe5 |
| 87 |
| 88 ret i32 %mul |
| 89 |
| 90 ; ASM-NEXT: ldr r0, [sp, #4084] |
| 91 ; ******* Movw case to check ******* |
| 92 ; ASM-NEXT: movw ip, #4092 |
| 93 ; ASM-NEXT: add sp, sp, ip |
| 94 ; ASM-NEXT: bx lr |
| 95 |
| 96 ; DIS-NEXT: 1c: e59d0ff4 |
| 97 ; DIS-NEXT: 20: e300cffc |
| 98 ; DIS-NEXT: 24: e08dd00c |
| 99 ; DIS-NEXT: 28: e12fff1e |
| 100 |
| 101 ; IASM-NEXT: .byte 0xf4 |
| 102 ; IASM-NEXT: .byte 0xf |
| 103 ; IASM-NEXT: .byte 0x9d |
| 104 ; IASM-NEXT: .byte 0xe5 |
| 105 |
| 106 ; IASM-NEXT: .byte 0xfc |
| 107 ; IASM-NEXT: .byte 0xcf |
| 108 ; IASM-NEXT: .byte 0x0 |
| 109 ; IASM-NEXT: .byte 0xe3 |
| 110 |
| 111 ; IASM-NEXT: .byte 0xc |
| 112 ; IASM-NEXT: .byte 0xd0 |
| 113 ; IASM-NEXT: .byte 0x8d |
| 114 ; IASM-NEXT: .byte 0xe0 |
| 115 |
| 116 ; IASM-NEXT: .byte 0x1e |
| 117 ; IASM-NEXT: .byte 0xff |
| 118 ; IASM-NEXT: .byte 0x2f |
| 119 ; IASM-NEXT: .byte 0xe1 |
| 120 |
| 121 } |
| OLD | NEW |