1 %default {"preinstr":"", "result0":"a0", "result1":"a1"} 2 /* 3 * Generic 32bit-to-64bit unary operation. Provide an "instr" line 4 * that specifies an instruction that performs "result = op a0", where 5 * "result" is a 64-bit quantity in a0/a1. 6 * 7 * For: int-to-long, int-to-double, float-to-long, float-to-double 8 */ 9 /* unop vA, vB */ 10 GET_OPA4(t1) # t1 <- A+ 11 GET_OPB(a3) # a3 <- B 12 GET_VREG(a0, a3) # a0 <- vB 13 EAS2(rOBJ, rFP, t1) # rOBJ <- &fp[A] 14 FETCH_ADVANCE_INST(1) # advance rPC, load rINST 15 $preinstr # optional op 16 $instr # result <- op, a0-a3 changed 17 GET_INST_OPCODE(t0) # extract opcode from rINST 18 STORE64($result0, $result1, rOBJ) # vA/vA+1 <- a0/a1 19 GOTO_OPCODE(t0) # jump to next instruction 20 /* 10-11 instructions */ 21