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

Side by Side Diff: tests_lit/assembler/arm32/vmrs.ll

Issue 1636473002: Add the VMRS instruction to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Format. 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 unified diff | Download patch
« no previous file with comments | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Show that we know how to translate vmov for casts. 1 ; Test the "vmrs APSR_nzcv, FPSCR" form of the VMRS instruction.
2 2
3 ; NOTE: Restricts S register to one that will better test S register encodings.
4
5 ; REQUIRES: allow_dump 3 ; REQUIRES: allow_dump
6 4
7 ; Compile using standalone assembler. 5 ; Compile using standalone assembler.
8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
9 ; RUN: -reg-use s20,s22,d20,d22 \ 7 ; RUN: -reg-use s20,s22,d20,d22 \
Jim Stichnoth 2016/01/25 16:48:45 Do you need the -reg-use lines if you aren't testi
Karl 2016/01/25 17:17:44 Good point. I forgot about the register argument w
10 ; RUN: | FileCheck %s --check-prefix=ASM 8 ; RUN: | FileCheck %s --check-prefix=ASM
11 9
12 ; Show bytes in assembled standalone code. 10 ; Show bytes in assembled standalone code.
13 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ 11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
14 ; RUN: --args -Om1 \ 12 ; RUN: --args -Om1 \
15 ; RUN: -reg-use s20,s22,d20,d22 \ 13 ; RUN: -reg-use s20,s22,d20,d22 \
16 ; RUN: | FileCheck %s --check-prefix=DIS 14 ; RUN: | FileCheck %s --check-prefix=DIS
17 15
18 ; Compile using integrated assembler. 16 ; Compile using integrated assembler.
19 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ 17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
20 ; RUN: -reg-use s20,s22,d20,d22 \ 18 ; RUN: -reg-use s20,s22,d20,d22 \
21 ; RUN: | FileCheck %s --check-prefix=IASM 19 ; RUN: | FileCheck %s --check-prefix=IASM
22 20
23 ; Show bytes in assembled integrated code. 21 ; Show bytes in assembled integrated code.
24 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ 22 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
25 ; RUN: --args -Om1 \ 23 ; RUN: --args -Om1 \
26 ; RUN: -reg-use s20,s22,d20,d22 \ 24 ; RUN: -reg-use s20,s22,d20,d22 \
27 ; RUN: | FileCheck %s --check-prefix=DIS 25 ; RUN: | FileCheck %s --check-prefix=DIS
28 26
29 define internal float @castToFloat(i32 %a) { 27 define internal i32 @testVmrsASPR_nzcv() {
30 ; ASM-LABEL: castToFloat: 28 ; ASM-LABEL: testVmrsASPR_nzcv:
31 ; DIS-LABEL: 00000000 <castToFloat>: 29 ; DIS-LABEL: 00000000 <testVmrsASPR_nzcv>:
32 ; IASM-LABEL: castToFloat:
33 30
34 entry: 31 entry:
35 ; ASM: .LcastToFloat$entry: 32 ; ASM: .LtestVmrsASPR_nzcv$entry:
36 ; IASM: .LcastToFloat$entry:
37 33
38 %0 = bitcast i32 %a to float 34 %test = fcmp olt float 0.0, 0.0
39 35
40 ; ASM: vmov s20, r0 36 ; ASM: vmrs APSR_nzcv, FPSCR
41 ; DIS: 10: ee0a0a10 37 ; DIS: 18: eef1fa10
42 ; IASM-NOT: vmov 38 ; IASM-NOT: vmrs
43 39
44 ret float %0 40 %result = zext i1 %test to i32
41 ret i32 %result
45 } 42 }
OLDNEW
« 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