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

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

Issue 1624383004: Add VMOV(immediate) instructions to the ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix issues in previous patch. 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-imm.ll
diff --git a/tests_lit/assembler/arm32/vmov-imm.ll b/tests_lit/assembler/arm32/vmov-imm.ll
new file mode 100644
index 0000000000000000000000000000000000000000..575ee63dd57d7a4f5c8537506c8c6453c2860348
--- /dev/null
+++ b/tests_lit/assembler/arm32/vmov-imm.ll
@@ -0,0 +1,51 @@
+; Test moving constants into VPF registers.
+
+; REQUIRES: allow_dump
+
+; Compile using standalone assembler.
+; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 -reg-use=d21,s20 \
+; 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 -reg-use=d21,s20 \
+; RUN: | FileCheck %s --check-prefix=DIS
+
+; Compile using integrated assembler.
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 -reg-use=d21,s20 \
+; 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 -reg-use=d21,s20 \
+; RUN: | FileCheck %s --check-prefix=DIS
+
+define internal void @testMoveDouble() {
+; ASM-LABEL: testMoveDouble:
+; DIS-LABEL: 00000000 <testMoveDouble>:
+
+entry:
+ %addr = inttoptr i32 0 to double*
+ store double 1.5, double* %addr, align 8
Jim Stichnoth 2016/01/26 17:37:36 BTW, you can make this test even simpler by droppi
Karl 2016/01/26 19:12:48 Surprisingly, this causes a pnacl-freeze error for
+
+; ASM: vmov.f64 d21, #1.500000e+00
+; DIS: 4: eef75b08
+; IASM-NOT: vmov.f64
+
+ ret void
+}
+
+define internal void @testMoveFloat() {
+; ASM-LABEL: testMoveFloat:
+; DIS-LABEL: 00000010 <testMoveFloat>:
+
+entry:
+ %addr = inttoptr i32 0 to float*
+ store float 1.5, float* %addr, align 4
+
+; ASM: vmov.f32 s20, #1.500000e+00
+; DIS: 18: eeb7aa08
+; IASM-NOT: vmov.f32
+
+ ret void
+}
« 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