Home | History | Annotate | Download | only in arm32
      1 ; Test vldr{s,d} and vstr{s,d} when address is offset with an immediate.
      2 
      3 ; REQUIRES: allow_dump
      4 
      5 ; Compile using standalone assembler.
      6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
      7 ; RUN:   -reg-use 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 -Om1 \
     13 ; RUN:   -reg-use d20 \
     14 ; RUN:   | FileCheck %s --check-prefix=DIS
     15 
     16 ; Compile using integrated assembler.
     17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
     18 ; RUN:   -reg-use 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 -Om1 \
     24 ; RUN:   -reg-use d20 \
     25 ; RUN:   | FileCheck %s --check-prefix=DIS
     26 
     27 define internal i32 @testFloatImm(float %f) {
     28 ; ASM-LABEL: testFloatImm:
     29 ; DIS-LABEL: 00000000 <testFloatImm>:
     30 ; IASM-LABEL: testFloatImm:
     31 
     32 entry:
     33 ; ASM: .LtestFloatImm$entry:
     34 ; IASM: .LtestFloatImm$entry:
     35 
     36 ; ASM:  vstr    s0, [sp, #4]
     37 ; DIS:    4:    ed8d0a01
     38 ; IASM-NOT: vstr
     39 
     40   %v = bitcast float %f to i32
     41 
     42 ; ASM:  vldr    s0, [sp, #4]
     43 ; DIS:    8:    ed9d0a01
     44 ; IASM-NOT: vldr
     45 
     46   ret i32 %v
     47 }
     48 
     49 define internal i64 @testDoubleImm(double %d) {
     50 ; ASM-LABEL: testDoubleImm:
     51 ; DIS-LABEL: 00000020 <testDoubleImm>:
     52 ; IASM-LABEL: testDoubleImm:
     53 
     54 entry:
     55 ; ASM: .LtestDoubleImm$entry:
     56 ; IASM: .LtestDoubleImm$entry:
     57 
     58 ; ASM:  vstr    d0, [sp, #8]
     59 ; DIS:   24:    ed8d0b02
     60 ; IASM-NOT: vstr
     61 
     62   %v = bitcast double %d to i64
     63 
     64 ; ASM:  vldr    d20, [sp, #8]
     65 ; DIS:   28:    eddd4b02
     66 ; IASM-NOT: vldr
     67 
     68   ret i64 %v
     69 }
     70