1%default {"preinstr":"", "result0":"a0"}
2    /*
3     * Generic 32-bit unary operation.  Provide an "instr" line that
4     * specifies an instruction that performs "result0 = op a0".
5     * This could be a MIPS instruction or a function call.
6     *
7     * for: int-to-byte, int-to-char, int-to-short,
8     *      neg-int, not-int, neg-float
9     */
10    /* unop vA, vB */
11    GET_OPB(a3)                            #  a3 <- B
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)        #  vA <- result0
19