Home | History | Annotate | Download | only in mips
      1     /*
      2      * Generic 64-bit binary operation.  Provide an "instr" line that
      3      * specifies an instruction that performs "result = a0-a1 op a2-a3".
      4      * This could be an MIPS instruction or a function call.
      5      *
      6      * for: add-double, sub-double, mul-double, div-double,
      7      *      rem-double
      8      *
      9      */
     10     /* binop vAA, vBB, vCC */
     11     FETCH(a0, 1)                           #  a0 <- CCBB
     12     GET_OPA(rOBJ)                          #  s5 <- AA
     13     and       a2, a0, 255                  #  a2 <- BB
     14     srl       a3, a0, 8                    #  a3 <- CC
     15     EAS2(a2, rFP, a2)                      #  a2 <- &fp[BB]
     16     EAS2(t1, rFP, a3)                      #  a3 <- &fp[CC]
     17     LOAD64_F(fa0, fa0f, a2)
     18     LOAD64_F(fa1, fa1f, t1)
     19 
     20     FETCH_ADVANCE_INST(2)                  #  advance rPC, load rINST
     21     $instr
     22     SET_VREG64_F(fv0, fv0f, rOBJ)
     23     b         .L${opcode}_finish
     24 %break
     25 
     26 .L${opcode}_finish:
     27     GET_INST_OPCODE(t0)                    #  extract opcode from rINST
     28     GOTO_OPCODE(t0)                        #  jump to next instruction
     29