Home | History | Annotate | Download | only in arm-vfp
      1     /*
      2      * Generic 32-bit floating-point operation.  Provide an "instr" line that
      3      * specifies an instruction that performs "s2 = s0 op s1".  Because we
      4      * use the "softfp" ABI, this must be an instruction, not a function call.
      5      *
      6      * For: add-float, sub-float, mul-float, div-float
      7      */
      8     /* floatop vAA, vBB, vCC */
      9     FETCH(r0, 1)                        @ r0<- CCBB
     10     mov     r9, rINST, lsr #8           @ r9<- AA
     11     mov     r3, r0, lsr #8              @ r3<- CC
     12     and     r2, r0, #255                @ r2<- BB
     13     VREG_INDEX_TO_ADDR(r3, r3)          @ r3<- &vCC
     14     VREG_INDEX_TO_ADDR(r2, r2)          @ r2<- &vBB
     15     flds    s1, [r3]                    @ s1<- vCC
     16     flds    s0, [r2]                    @ s0<- vBB
     17 
     18     FETCH_ADVANCE_INST(2)               @ advance rPC, load rINST
     19     $instr                              @ s2<- op
     20     GET_INST_OPCODE(ip)                 @ extract opcode from rINST
     21     VREG_INDEX_TO_ADDR(r9, r9)          @ r9<- &vAA
     22     fsts    s2, [r9]                    @ vAA<- s2
     23     GOTO_OPCODE(ip)                     @ jump to next instruction
     24