Home | History | Annotate | Download | only in arm32
      1 ; Show that we know how to translate (floating point) vstr.
      2 
      3 ; REQUIRES: allow_dump
      4 
      5 ; Compile using standalone assembler.
      6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \
      7 ; RUN:   -reg-use r5,r6,s20,d20 \
      8 ; RUN:   | FileCheck %s --check-prefix=ASM
      9 
     10 ; Show bytes in assembled standalone code.
     11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
     12 ; RUN:   --args -O2 \
     13 ; RUN:   -reg-use r5,r6,s20,d20 \
     14 ; RUN:   | FileCheck %s --check-prefix=DIS
     15 
     16 ; Compile using integrated assembler.
     17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
     18 ; RUN:   -reg-use r5,r6,s20,d20 \
     19 ; RUN:   | FileCheck %s --check-prefix=IASM
     20 
     21 ; Show bytes in assembled integrated code.
     22 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
     23 ; RUN:   --args -O2 \
     24 ; RUN:   -reg-use r5,r6,s20,d20 \
     25 ; RUN:   | FileCheck %s --check-prefix=DIS
     26 
     27 define internal void @testFloat() {
     28 ; ASM-LABEL: testFloat:
     29 ; DIS-LABEL: 00000000 <testFloat>:
     30 ; IASM-LABEL: testFloat:
     31 
     32 entry:
     33 ; ASM: .LtestFloat$entry:
     34 
     35   %vaddr = inttoptr i32 0 to float*
     36   store float 0.0, float* %vaddr, align 1
     37 
     38 ; ASM:  vstr    s20, [r5]
     39 ; DIS:  14:     ed96aa00
     40 ; IASM-NOT: vstr
     41 
     42   ret void
     43 }
     44 
     45 define internal void @testDouble() {
     46 ; ASM-LABEL: testDouble:
     47 ; DIS-LABEL: 00000030 <testDouble>:
     48 ; IASM-LABEL: testDouble:
     49 
     50 entry:
     51 ; ASM: .LtestDouble$entry:
     52 
     53   %vaddr = inttoptr i32 0 to double*
     54   store double 0.0, double* %vaddr, align 1
     55 
     56 ; ASM:  vstr    d20, [r5]
     57 ; DIS:  3c:     edc54b00
     58 ; IASM-NOT: vstr
     59 
     60   ret void
     61 }
     62