blob: 73034411e13c5253bf9b24de1313a22c8161cf6c [file] [log] [blame]
Douglas Leung200f0402016-02-25 20:05:47 -08001 /*
Alexey Frunze84603bf2016-10-21 19:54:43 -07002 * Generic 64-bit floating-point "/2addr" binary operation.
3 * Provide an "instr" line that specifies an instruction that
4 * performs "fv0 = fa0 op fa1".
Douglas Leung200f0402016-02-25 20:05:47 -08005 * This could be an MIPS instruction or a function call.
6 *
7 * For: add-double/2addr, sub-double/2addr, mul-double/2addr,
Alexey Frunze84603bf2016-10-21 19:54:43 -07008 * div-double/2addr, rem-double/2addr
Douglas Leung200f0402016-02-25 20:05:47 -08009 */
10 /* binop/2addr vA, vB */
11 GET_OPA4(rOBJ) # rOBJ <- A+
12 GET_OPB(a1) # a1 <- B
13 EAS2(a1, rFP, a1) # a1 <- &fp[B]
14 EAS2(t0, rFP, rOBJ) # t0 <- &fp[A]
15 LOAD64_F(fa0, fa0f, t0)
16 LOAD64_F(fa1, fa1f, a1)
17
18 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
19 $instr
Douglas Leung200f0402016-02-25 20:05:47 -080020 GET_INST_OPCODE(t0) # extract opcode from rINST
Alexey Frunze84603bf2016-10-21 19:54:43 -070021 SET_VREG64_F_GOTO(fv0, fv0f, rOBJ, t0) # vA/vA+1 <- fv0