| OLD | NEW |
| 1 ; Show that we know how to translate push and pop. | 1 ; Show that we know how to translate push and pop. |
| 2 ; TODO(kschimpf) Translate pop instructions. | 2 ; TODO(kschimpf) Translate pop instructions. |
| 3 | 3 |
| 4 ; NOTE: We use -O2 to get rid of memory stores. | 4 ; NOTE: We use -O2 to get rid of memory stores. |
| 5 | 5 |
| 6 ; REQUIRES: allow_dump | 6 ; REQUIRES: allow_dump |
| 7 | 7 |
| 8 ; Compile using standalone assembler. | 8 ; Compile using standalone assembler. |
| 9 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 -allow-extern \ | 9 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 -allow-extern \ |
| 10 ; RUN: -reg-use r0,r1,r2,r3,r4,r5 | FileCheck %s --check-prefix=ASM | 10 ; RUN: -reg-use r0,r1,r2,r3,r4,r5 | FileCheck %s --check-prefix=ASM |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 define internal void @SinglePushPop() { | 29 define internal void @SinglePushPop() { |
| 30 ; ASM-LABEL:SinglePushPop: | 30 ; ASM-LABEL:SinglePushPop: |
| 31 ; DIS-LABEL:{{.+}} <SinglePushPop>: | 31 ; DIS-LABEL:{{.+}} <SinglePushPop>: |
| 32 ; IASM-LABEL:SinglePushPop: | 32 ; IASM-LABEL:SinglePushPop: |
| 33 | 33 |
| 34 ; ASM: push {lr} | 34 ; ASM: push {lr} |
| 35 ; DIS: {{.+}} e52de004 | 35 ; DIS: {{.+}} e52de004 |
| 36 ; IASM-NOT: push | 36 ; IASM-NOT: push |
| 37 | 37 |
| 38 call void @DoSomething(); | 38 call void @DoSomething(); |
| 39 ret void | 39 ret void |
| 40 | 40 |
| 41 ; ASM: pop {lr} | 41 ; ASM: pop {lr} |
| 42 ; DIS: {{.+}} e49de004 | 42 ; DIS: {{.+}} e49de004 |
| 43 ; IASM-NOT: pop | 43 ; IASM-NOT: pop |
| 44 | 44 |
| 45 } | 45 } |
| 46 | 46 |
| 47 ; This test is based on taking advantage of the over-eager -O2 | 47 ; This test is based on taking advantage of the over-eager -O2 |
| 48 ; register allocator that puts V1 and V2 into callee-save registers, | 48 ; register allocator that puts V1 and V2 into callee-save registers, |
| 49 ; since the call instruction kills the scratch registers. This | 49 ; since the call instruction kills the scratch registers. This |
| (...skipping 11 matching lines...) Expand all Loading... |
| 61 | 61 |
| 62 call void @DoSomething(); | 62 call void @DoSomething(); |
| 63 %v3 = add i32 %v1, %v2 | 63 %v3 = add i32 %v1, %v2 |
| 64 ret i32 %v3 | 64 ret i32 %v3 |
| 65 | 65 |
| 66 ; ASM: pop {r4, r5, lr} | 66 ; ASM: pop {r4, r5, lr} |
| 67 ; DIS: {{.+}} e8bd4030 | 67 ; DIS: {{.+}} e8bd4030 |
| 68 ; IASM-NOT: pop | 68 ; IASM-NOT: pop |
| 69 | 69 |
| 70 } | 70 } |
| OLD | NEW |