• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test the "vmrs APSR_nzcv, FPSCR" form of the VMRS instruction.
2
3; REQUIRES: allow_dump
4
5; Compile using standalone assembler.
6; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
7; RUN:   | FileCheck %s --check-prefix=ASM
8
9; Show bytes in assembled standalone code.
10; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
11; RUN:   --args -Om1 \
12; RUN:   | FileCheck %s --check-prefix=DIS
13
14; Compile using integrated assembler.
15; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
16; RUN:   | FileCheck %s --check-prefix=IASM
17
18; Show bytes in assembled integrated code.
19; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
20; RUN:   --args -Om1 \
21; RUN:   | FileCheck %s --check-prefix=DIS
22
23define internal i32 @testVmrsASPR_nzcv() {
24; ASM-LABEL: testVmrsASPR_nzcv:
25; DIS-LABEL: 00000000 <testVmrsASPR_nzcv>:
26
27entry:
28; ASM: .LtestVmrsASPR_nzcv$entry:
29
30  %test = fcmp olt float 0.0, 0.0
31
32; ASM:  vmrs    APSR_nzcv, FPSCR
33; DIS:   14:    eef1fa10
34; IASM-NOT: vmrs
35
36  %result = zext i1 %test to i32
37  ret i32 %result
38}
39