Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1137)

Unified Diff: tests_lit/assembler/arm32/push-pop.ll

Issue 1687553002: Change all ARM calls into indirect calls. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests_lit/assembler/arm32/call.ll ('k') | tests_lit/assembler/arm32/sandboxing.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/assembler/arm32/push-pop.ll
diff --git a/tests_lit/assembler/arm32/push-pop.ll b/tests_lit/assembler/arm32/push-pop.ll
index 7a5791e7b9bcf003278ec4bfaa33871e355d646f..17c970627fa91694321510c10748742bac334440 100644
--- a/tests_lit/assembler/arm32/push-pop.ll
+++ b/tests_lit/assembler/arm32/push-pop.ll
@@ -7,71 +7,42 @@
; Compile using standalone assembler.
; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 -allow-extern \
-; RUN: | FileCheck %s --check-prefix=ASM
+; RUN: -reg-use r0,r1,r2,r3,r4,r5 | FileCheck %s --check-prefix=ASM
; Show bytes in assembled standalone code.
; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
-; RUN: --args -O2 -allow-extern | FileCheck %s --check-prefix=DIS
+; RUN: --args -O2 -allow-extern -reg-use r0,r1,r2,r3,r4,r5 \
+; RUN: | FileCheck %s --check-prefix=DIS
; Compile using integrated assembler.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
-; RUN: -allow-extern | FileCheck %s --check-prefix=IASM
+; RUN: -allow-extern -reg-use r0,r1,r2,r3,r4,r5 \
+; RUN: | FileCheck %s --check-prefix=IASM
; Show bytes in assembled integrated code.
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
-; RUN: --args -O2 -allow-extern | FileCheck %s --check-prefix=DIS
+; RUN: --args -O2 -allow-extern -reg-use r0,r1,r2,r3,r4,r5 \
+; RUN: | FileCheck %s --check-prefix=DIS
declare external void @DoSomething()
define internal void @SinglePushPop() {
+; ASM-LABEL:SinglePushPop:
+; DIS-LABEL:{{.+}} <SinglePushPop>:
+; IASM-LABEL:SinglePushPop:
+
+; ASM: push {lr}
+; DIS: {{.+}} e52de004
+; IASM-NOT: push
+
call void @DoSomething();
ret void
-}
-; ASM-LABEL:SinglePushPop:
-; ASM-NEXT:.LSinglePushPop$__0:
-; ASM-NEXT: push {lr}
-; ASM-NEXT: sub sp, sp, #12
-; ASM-NEXT: bl DoSomething
-; ASM-NEXT: add sp, sp, #12
-; ASM-NEXT: pop {lr}
-; ASM-NEXT: # lr = def.pseudo
-; ASM-NEXT: bx lr
-
-; DIS-LABEL:00000000 <SinglePushPop>:
-; DIS-NEXT: 0: e52de004
-; DIS-NEXT: 4: e24dd00c
-; DIS-NEXT: 8: ebfffffe
-; DIS-NEXT: c: e28dd00c
-; DIS-NEXT: 10: e49de004
-; DIS-NEXT: 14: e12fff1e
+; ASM: pop {lr}
+; DIS: {{.+}} e49de004
+; IASM-NOT: pop
-; IASM-LABEL:SinglePushPop:
-; IASM-NEXT:.LSinglePushPop$__0:
-; IASM-NEXT: .byte 0x4
-; IASM-NEXT: .byte 0xe0
-; IASM-NEXT: .byte 0x2d
-; IASM-NEXT: .byte 0xe5
-
-; IASM-NEXT: .byte 0xc
-; IASM-NEXT: .byte 0xd0
-; IASM-NEXT: .byte 0x4d
-; IASM-NEXT: .byte 0xe2
-; IASM-NEXT: bl DoSomething @ .word ebfffffe
-; IASM-NEXT: .byte 0xc
-; IASM-NEXT: .byte 0xd0
-; IASM-NEXT: .byte 0x8d
-; IASM-NEXT: .byte 0xe2
-
-; IASM-NEXT: .byte 0x4
-; IASM-NEXT: .byte 0xe0
-; IASM-NEXT: .byte 0x9d
-; IASM-NEXT: .byte 0xe4
-
-; IASM: .byte 0x1e
-; IASM-NEXT: .byte 0xff
-; IASM-NEXT: .byte 0x2f
-; IASM-NEXT: .byte 0xe1
+}
; This test is based on taking advantage of the over-eager -O2
; register allocator that puts V1 and V2 into callee-save registers,
@@ -79,83 +50,21 @@ define internal void @SinglePushPop() {
; requires the callee-save registers to be pushed/popped in the
; prolog/epilog.
define internal i32 @MultPushPop(i32 %v1, i32 %v2) {
+; ASM-LABEL:MultPushPop:
+; DIS_LABEL: {{.+}} <MultPushPop>:
+; IASM-LABEL:MultPushPop:
+; ASM: push {r4, r5, lr}
+; DIS: {{.+}}: e92d4030
+
+; IASM-NOT: push
+
+
call void @DoSomething();
%v3 = add i32 %v1, %v2
ret i32 %v3
-}
-; ASM-LABEL:MultPushPop:
-; ASM-NEXT:.LMultPushPop$__0:
-; ASM-NEXT: push {r4, r5, lr}
-; ASM-NEXT: sub sp, sp, #4
-; ASM-NEXT: mov r4, r0
-; ASM-NEXT: mov r5, r1
-; ASM-NEXT: bl DoSomething
-; ASM-NEXT: add r4, r4, r5
-; ASM-NEXT: mov r0, r4
-; ASM-NEXT: add sp, sp, #4
-; ASM-NEXT: pop {r4, r5, lr}
-; ASM-NEXT: # r4 = def.pseudo
-; ASM-NEXT: # r5 = def.pseudo
-; ASM-NEXT: # lr = def.pseudo
-; ASM-NEXT: bx lr
-
-; DIS-LABEL:00000020 <MultPushPop>:
-; DIS-NEXT: 20: e92d4030
-; DIS-NEXT: 24: e24dd004
-; DIS-NEXT: 28: e1a04000
-; DIS-NEXT: 2c: e1a05001
-; DIS-NEXT: 30: ebfffffe
-; DIS-NEXT: 34: e0844005
-; DIS-NEXT: 38: e1a00004
-; DIS-NEXT: 3c: e28dd004
-; DIS-NEXT: 40: e8bd4030
-; DIS-NEXT: 44: e12fff1e
+; ASM: pop {r4, r5, lr}
+; DIS: {{.+}} e8bd4030
+; IASM-NOT: pop
-; IASM-LABEL:MultPushPop:
-; IASM-NEXT:.LMultPushPop$__0:
-; IASM-NEXT: .byte 0x30
-; IASM-NEXT: .byte 0x40
-; IASM-NEXT: .byte 0x2d
-; IASM-NEXT: .byte 0xe9
-
-; IASM-NEXT: .byte 0x4
-; IASM-NEXT: .byte 0xd0
-; IASM-NEXT: .byte 0x4d
-; IASM-NEXT: .byte 0xe2
-
-; IASM-NEXT: .byte 0x0
-; IASM-NEXT: .byte 0x40
-; IASM-NEXT: .byte 0xa0
-; IASM-NEXT: .byte 0xe1
-
-; IASM-NEXT: .byte 0x1
-; IASM-NEXT: .byte 0x50
-; IASM-NEXT: .byte 0xa0
-; IASM-NEXT: .byte 0xe1
-
-; IASM-NEXT: bl DoSomething @ .word ebfffffe
-; IASM-NEXT: .byte 0x5
-; IASM-NEXT: .byte 0x40
-; IASM-NEXT: .byte 0x84
-; IASM-NEXT: .byte 0xe0
-
-; IASM-NEXT: .byte 0x4
-; IASM-NEXT: .byte 0x0
-; IASM-NEXT: .byte 0xa0
-; IASM-NEXT: .byte 0xe1
-
-; IASM-NEXT: .byte 0x4
-; IASM-NEXT: .byte 0xd0
-; IASM-NEXT: .byte 0x8d
-; IASM-NEXT: .byte 0xe2
-
-; IASM-NEXT: .byte 0x30
-; IASM-NEXT: .byte 0x40
-; IASM-NEXT: .byte 0xbd
-; IASM-NEXT: .byte 0xe8
-
-; IASM: .byte 0x1e
-; IASM-NEXT: .byte 0xff
-; IASM-NEXT: .byte 0x2f
-; IASM-NEXT: .byte 0xe1
+}
« no previous file with comments | « tests_lit/assembler/arm32/call.ll ('k') | tests_lit/assembler/arm32/sandboxing.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698