blob: b2b22c97946fd692e2680073fc8157661821fafd [file] [log] [blame]
Douglas Leung200f0402016-02-25 20:05:47 -08001 /*
Alexey Frunze84603bf2016-10-21 19:54:43 -07002 * Generic 32-bit floating-point unary operation. Provide an "instr"
3 * line that specifies an instruction that performs "fv0 = op fa0".
Douglas Leung200f0402016-02-25 20:05:47 -08004 * This could be a MIPS instruction or a function call.
5 *
Alexey Frunze84603bf2016-10-21 19:54:43 -07006 * for: int-to-float
Douglas Leung200f0402016-02-25 20:05:47 -08007 */
8 /* unop vA, vB */
9 GET_OPB(a3) # a3 <- B
Alexey Frunze84603bf2016-10-21 19:54:43 -070010 GET_OPA4(rOBJ) # rOBJ <- A+
Douglas Leung200f0402016-02-25 20:05:47 -080011 GET_VREG_F(fa0, a3)
12 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
13 $instr
Douglas Leung200f0402016-02-25 20:05:47 -080014 GET_INST_OPCODE(t1) # extract opcode from rINST
Alexey Frunze84603bf2016-10-21 19:54:43 -070015 SET_VREG_F_GOTO(fv0, rOBJ, t1) # vA <- fv0