OLD | NEW |
1 ; Show that we know how to translate bic. | 1 ; Show that we know how to translate bic. |
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 |
11 ; Show bytes in assembled standalone code. | 11 ; Show bytes in assembled standalone code. |
12 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | 12 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
13 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS | 13 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS |
14 | 14 |
15 ; Compile using integrated assembler. | 15 ; Compile using integrated assembler. |
16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 -unsafe-ias \ | 16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 -unsafe-ias \ |
17 ; RUN: | FileCheck %s --check-prefix=IASM | 17 ; RUN: | FileCheck %s --check-prefix=IASM |
18 | 18 |
19 ; Show bytes in assembled integrated code. | 19 ; Show bytes in assembled integrated code. |
20 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ | 20 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ |
21 ; RUN: --args -O2 -unsafe-ias | FileCheck %s --check-prefix=DIS | 21 ; RUN: --args -O2 -unsafe-ias | FileCheck %s --check-prefix=DIS |
22 | 22 |
23 define internal i32 @AllocBigAlign() { | 23 define internal i32 @AllocBigAlign() { |
24 %addr = alloca i8, align 32 | 24 %addr = alloca i8, align 32 |
25 %v = ptrtoint i8* %addr to i32 | 25 %v = ptrtoint i8* %addr to i32 |
26 ret i32 %v | 26 ret i32 %v |
27 } | 27 } |
28 | 28 |
29 ; ASM-LABEL:AllocBigAlign: | 29 ; ASM-LABEL:AllocBigAlign: |
30 ; ASM:.LAllocBigAlign$__0: | 30 ; ASM-NEXT:.LAllocBigAlign$__0: |
31 ; ASM: push {fp} | 31 ; ASM-NEXT: push {fp} |
32 ; ASM: mov fp, sp | 32 ; ASM-NEXT: mov fp, sp |
33 ; ASM: sub sp, sp, #12 | 33 ; ASM-NEXT: sub sp, sp, #12 |
34 ; ASM: bic sp, sp, #31 | 34 ; ASM-NEXT: bic sp, sp, #31 |
35 ; ASM: sub sp, sp, #32 | 35 ; ASM-NEXT: sub sp, sp, #32 |
36 ; ASM: mov r0, sp | 36 ; ASM-NEXT: mov r0, sp |
37 ; ASM: mov sp, fp | 37 ; ASM-NEXT: mov sp, fp |
38 ; ASM: pop {fp} | 38 ; ASM-NEXT: pop {fp} |
39 ; ASM: # fp = def.pseudo | 39 ; ASM-NEXT: # fp = def.pseudo |
40 ; ASM: bx lr | 40 ; ASM-NEXT: bx lr |
41 | 41 |
42 ; DIS-LABEL:00000000 <AllocBigAlign>: | 42 ; DIS-LABEL:00000000 <AllocBigAlign>: |
43 ; DIS-NEXT: 0: e52db004 | 43 ; DIS-NEXT: 0: e52db004 |
44 ; DIS-NEXT: 4: e1a0b00d | 44 ; DIS-NEXT: 4: e1a0b00d |
45 ; DIS-NEXT: 8: e24dd00c | 45 ; DIS-NEXT: 8: e24dd00c |
46 ; DIS-NEXT: c: e3cdd01f | 46 ; DIS-NEXT: c: e3cdd01f |
47 ; DIS-NEXT: 10: e24dd020 | 47 ; DIS-NEXT: 10: e24dd020 |
48 ; DIS-NEXT: 14: e1a0000d | 48 ; DIS-NEXT: 14: e1a0000d |
49 ; DIS-NEXT: 18: e1a0d00b | 49 ; DIS-NEXT: 18: e1a0d00b |
50 ; DIS-NEXT: 1c: e49db004 | 50 ; DIS-NEXT: 1c: e49db004 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 ; IASM-NEXT: .byte 0x4 | 90 ; IASM-NEXT: .byte 0x4 |
91 ; IASM-NEXT: .byte 0xb0 | 91 ; IASM-NEXT: .byte 0xb0 |
92 ; IASM-NEXT: .byte 0x9d | 92 ; IASM-NEXT: .byte 0x9d |
93 ; IASM-NEXT: .byte 0xe4 | 93 ; IASM-NEXT: .byte 0xe4 |
94 | 94 |
95 ; IASM: .byte 0x1e | 95 ; IASM: .byte 0x1e |
96 ; IASM-NEXT: .byte 0xff | 96 ; IASM-NEXT: .byte 0xff |
97 ; IASM-NEXT: .byte 0x2f | 97 ; IASM-NEXT: .byte 0x2f |
98 ; IASM-NEXT: .byte 0xe1 | 98 ; IASM-NEXT: .byte 0xe1 |
OLD | NEW |