1 %default {"preinstr":"", "result0":"a0"}
3 * Generic 32-bit unary operation. Provide an "instr" line that
4 * specifies an instruction that performs "result = op a0".
5 * This could be a MIPS instruction or a function call.
7 * for: neg-int, not-int, neg-float, int-to-float, float-to-int,
8 * int-to-byte, int-to-char, int-to-short
12 GET_OPA4(t0) # t0 <- A+
13 GET_VREG(a0, a3) # a0 <- vB
14 FETCH_ADVANCE_INST(1) # advance rPC, load rINST
15 $preinstr # optional op
16 $instr # a0 <- op, a0-a3 changed
17 GET_INST_OPCODE(t1) # extract opcode from rINST
18 SET_VREG_GOTO($result0, t0, t1) # vAA <- result0
19 /* 9-10 instructions */