• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Show that we know how to translate vpush and vpop.
2
3; NOTE: We use -O2 because vpush/vpop only occur if optimized. Uses
4; simple call with double parameters to cause the insertion of
5; vpush/vpop.
6
7; REQUIRES: allow_dump
8
9; Compile using standalone assembler.
10; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 -reg-use=d9,d10 \
11; RUN:   | FileCheck %s --check-prefix=ASM
12
13; Show bytes in assembled standalone code.
14; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
15; RUN:   --args -O2 -reg-use=d9,d10 \
16; RUN:   | FileCheck %s --check-prefix=DIS
17
18; Compile using integrated assembler.
19; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 -reg-use=d9,d10 \
20; RUN:   | FileCheck %s --check-prefix=IASM
21
22; Show bytes in assembled integrated code.
23; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
24; RUN:   --args -O2 -reg-use=d9,d10 \
25; RUN:   | FileCheck %s --check-prefix=DIS
26
27define internal double @testVpushVpop(double %v1, double %v2) {
28; ASM-LABEL: testVpushVpop:
29; DIS-LABEL: 00000000 <testVpushVpop>:
30
31; ASM:  vpush   {s18, s19, s20, s21}
32; DIS:    0:    ed2d9a04
33; IASM-NOT: vpush
34
35  call void @foo()
36  %res = fadd double %v1, %v2
37  ret double %res
38
39; ASM:  vpop    {s18, s19, s20, s21}
40; DIS:   28:       ecbd9a04
41; IASM-NOT: vpopd
42
43}
44
45define internal void @foo() {
46  ret void
47}
48