1 `define INSN_RET 9'b0110x1001 // 1 = RETI, 0 = RET
2 `define INSN_RETCC 9'b0110xx000
5 `INSN_RET,`INSN_RETCC: begin
8 1: begin // SPECIAL CASE: cycle does NOT increase linearly with ret!
9 `EXEC_INC_PC // cycle 1 is skipped if we are not retcc
11 `INSN_cc_NZ: if (`_F[7]) `EXEC_NEWCYCLE
12 `INSN_cc_Z: if (~`_F[7]) `EXEC_NEWCYCLE
13 `INSN_cc_NC: if (`_F[4]) `EXEC_NEWCYCLE
14 `INSN_cc_C: if (~`_F[4]) `EXEC_NEWCYCLE
16 `EXEC_READ(`_SP) // retry the read
18 2: `EXEC_READ(`_SP + 1)
19 3: begin /* twiddle thumbs */ end
26 `INSN_RET,`INSN_RETCC: begin
28 0: if (opcode[0]) // i.e., not RETCC
29 cycle <= 1; // Skip cycle 1; it gets incremented on the next round.
30 1: begin /* Nothing need happen here. */ end
35 if (opcode[4] && opcode[0]) /* RETI */