Home | History | Annotate | Download | only in mips
      1 %default {"preinstr":"", "load":"LOAD64_F(fa0, fa0f, a3)"}
      2     /*
      3      * Generic 64bit-to-32bit unary operation.  Provide an "instr" line
      4      * that specifies an instruction that performs "result = op a0/a1", where
      5      * "result" is a 32-bit quantity in a0.
      6      *
      7      * For: long-to-float, double-to-int, double-to-float
      8      * If hard floating point support is available, use fa0 as the parameter, except for
      9      * long-to-float opcode.
     10      * (This would work for long-to-int, but that instruction is actually
     11      * an exact match for OP_MOVE.)
     12      */
     13     /* unop vA, vB */
     14     GET_OPB(a3)                            #  a3 <- B
     15     GET_OPA4(rOBJ)                         #  t1 <- A+
     16     EAS2(a3, rFP, a3)                      #  a3 <- &fp[B]
     17 #ifdef SOFT_FLOAT
     18     LOAD64(rARG0, rARG1, a3)               #  a0/a1 <- vB/vB+1
     19 #else
     20     $load
     21 #endif
     22     FETCH_ADVANCE_INST(1)                  #  advance rPC, load rINST
     23     $preinstr                              #  optional op
     24 #ifdef SOFT_FLOAT
     25     $instr                                 #  a0 <- op, a0-a3 changed
     26 
     27 .L${opcode}_set_vreg:
     28     SET_VREG(v0, rOBJ)                     #  vA <- result0
     29 #else
     30     $instr_f
     31 
     32 .L${opcode}_set_vreg_f:
     33     SET_VREG_F(fv0, rOBJ)                  #  vA <- result0
     34 #endif
     35     GET_INST_OPCODE(t0)                    #  extract opcode from rINST
     36     GOTO_OPCODE(t0)                        #  jump to next instruction
     37     /* 10-11 instructions */
     38