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

Unified Diff: tests_lit/assembler/arm32/vmov-dbl.ll

Issue 1642253002: Add multi-source/dest VMOV to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 11 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/IceInstARM32.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/assembler/arm32/vmov-dbl.ll
diff --git a/tests_lit/assembler/arm32/vmov-dbl.ll b/tests_lit/assembler/arm32/vmov-dbl.ll
new file mode 100644
index 0000000000000000000000000000000000000000..4e86af98991c5469877662c477ca682b0d50bcce
--- /dev/null
+++ b/tests_lit/assembler/arm32/vmov-dbl.ll
@@ -0,0 +1,57 @@
+; Show that we can generate vmov for bitcasts between i64 and double.
+
+; REQUIRES: allow_dump
+
+; Compile using standalone assembler.
+; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
+; RUN: -allow-extern -reg-use r5,r10,d20 \
+; RUN: | FileCheck %s --check-prefix=ASM
+
+; Show bytes in assembled standalone code.
+; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
+; RUN: --args -Om1 \
+; RUN: -allow-extern -reg-use r5,r10,d20 \
+; RUN: | FileCheck %s --check-prefix=DIS
+
+; Compile using integrated assembler.
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
+; RUN: -allow-extern -reg-use r5,r10,d20 \
+; RUN: | FileCheck %s --check-prefix=IASM
+
+; Show bytes in assembled integrated code.
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
+; RUN: --args -Om1 \
+; RUN: -allow-extern -reg-use r5,r10,d20 \
+; RUN: | FileCheck %s --check-prefix=DIS
+
+define internal i64 @convertDoubleToI64(double %d) {
+; ASM-LABEL: convertDoubleToI64:
+; DIS-LABEL: {{.+}} <convertDoubleToI64>:
+
+ %v = bitcast double %d to i64
+
+; ASM: vmov r5, r10, d20
+; DIS: {{.+}}: ec5a5b34
+; IASM-NOT: vmov
+
+ ret i64 %v
+}
+
+define internal double @convertI64ToDouble(i64 %i) {
+; ASM-LABEL: convertI64ToDouble:
+; DIS-LABEL: {{.+}} <convertI64ToDouble>:
+
+ %v = bitcast i64 %i to double
+
+; ASM: vmov d20, r5, r10
+; DIS: {{.+}}: ec4a5b34
+; IASM-NOT: vmov
+
+ ; Note: This call is added to allow %v to be put into d20 (instead of
+ ; return register d0).
+ call void @ignore(double %v)
+
+ ret double %v
+}
+
+declare external void @ignore(double)
« no previous file with comments | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698