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

Unified Diff: tests_lit/assembler/arm32/call.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 | « src/IceTargetLoweringARM32.cpp ('k') | tests_lit/assembler/arm32/push-pop.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/assembler/arm32/call.ll
diff --git a/tests_lit/assembler/arm32/call.ll b/tests_lit/assembler/arm32/call.ll
new file mode 100644
index 0000000000000000000000000000000000000000..f551170c6f4a5ba2614e97d08335e5f8b5402aa3
--- /dev/null
+++ b/tests_lit/assembler/arm32/call.ll
@@ -0,0 +1,45 @@
+; Show that we convert direct calls, into indirect calls (to handle far
+; branches).
+
+; NOTE: We use -O2 to get rid of memory stores.
+
+; REQUIRES: allow_dump
+
+; Compile using standalone assembler.
+; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 -allow-extern \
+; RUN: -reg-use 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 -reg-use r5 | FileCheck %s --check-prefix=DIS
+
+; Compile using integrated assembler.
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
+; RUN: -allow-extern -reg-use r5 | 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 -reg-use r5 | FileCheck %s --check-prefix=DIS
+
+declare external void @doSomething()
+
+define internal void @callSomething() {
+; ASM-LABEL:callSomething:
+; DIS-LABEL:{{.+}} <callSomething>:
+; IASM-LABEL:callSomething:
+
+ call void @doSomething();
+
+; ASM: movw r5, #:lower16:doSomething
+; DIS: {{.+}}: e3005000
+; ASM-NOT: movw
+
+; ASM-NEXT: movt r5, #:upper16:doSomething
+; DIS-NEXT: {{.+}}: e3405000
+; ASM-NOT: movt
+
+; ASM-NEXT: blx r5
+; DIS-NEXT: {{.+}}: e12fff35
+; ASM-NOT: blx
+ ret void
+}
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | tests_lit/assembler/arm32/push-pop.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698