blob: c0dd1aa1d3e2c23722293974222ac23ff1d827ed [file] [log] [blame]
Alexey Frunze00b53b72016-02-02 20:25:45 -08001%default {"preinstr":""}
2 /*
3 * Generic 64-bit unary operation. Provide an "instr" line that
4 * specifies an instruction that performs "a0 = op a0".
5 *
6 * For: not-long, neg-long
7 */
8 /* unop vA, vB */
9 ext a3, rINST, 12, 4 # a3 <- B
10 GET_VREG_WIDE a0, a3 # a0 <- vB
11 ext a2, rINST, 8, 4 # a2 <- A
12 $preinstr # optional op
13 FETCH_ADVANCE_INST 1 # advance rPC, load rINST
14 $instr # a0 <- op, a0-a3 changed
15 GET_INST_OPCODE v0 # extract opcode from rINST
16 SET_VREG_WIDE a0, a2 # vA <- a0
17 GOTO_OPCODE v0 # jump to next instruction