blob: 2caaf9cbbb046678e4481c9cab208cf2a4b14347 [file] [log] [blame]
Douglas Leung200f0402016-02-25 20:05:47 -08001 /*
2 * Generic 32-bit "/2addr" binary operation. Provide an "instr"
Alexey Frunze84603bf2016-10-21 19:54:43 -07003 * that specifies an instruction that performs "fv0 = fa0 op fa1".
Douglas Leung200f0402016-02-25 20:05:47 -08004 * This could be an MIPS instruction or a function call.
5 *
6 * For: add-float/2addr, sub-float/2addr, mul-float/2addr,
Alexey Frunze84603bf2016-10-21 19:54:43 -07007 * div-float/2addr, rem-float/2addr
Douglas Leung200f0402016-02-25 20:05:47 -08008 */
9 /* binop/2addr vA, vB */
Alexey Frunze84603bf2016-10-21 19:54:43 -070010 GET_OPA4(rOBJ) # rOBJ <- A+
Douglas Leung200f0402016-02-25 20:05:47 -080011 GET_OPB(a3) # a3 <- B
12 GET_VREG_F(fa0, rOBJ)
13 GET_VREG_F(fa1, a3)
14 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
15
16 $instr
Douglas Leung200f0402016-02-25 20:05:47 -080017 GET_INST_OPCODE(t0) # extract opcode from rINST
Alexey Frunze84603bf2016-10-21 19:54:43 -070018 SET_VREG_F_GOTO(fv0, rOBJ, t0) # vA <- result