blob: a1fe91e25c52a1464dd6e313f5bbf0f1bf3fd5b8 [file] [log] [blame]
Douglas Leung200f0402016-02-25 20:05:47 -08001 /*
Alexey Frunze84603bf2016-10-21 19:54:43 -07002 * Generic 64-bit floating-point binary operation. Provide an "instr"
3 * line 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-double, sub-double, mul-double, div-double,
7 * rem-double
8 *
9 */
10 /* binop vAA, vBB, vCC */
11 FETCH(a0, 1) # a0 <- CCBB
Alexey Frunze84603bf2016-10-21 19:54:43 -070012 GET_OPA(rOBJ) # rOBJ <- AA
Douglas Leung200f0402016-02-25 20:05:47 -080013 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
Douglas Leung200f0402016-02-25 20:05:47 -080022 GET_INST_OPCODE(t0) # extract opcode from rINST
Alexey Frunze84603bf2016-10-21 19:54:43 -070023 SET_VREG64_F_GOTO(fv0, fv0f, rOBJ, t0) # vAA/vAA+1 <- fv0