]> Joshua Wise's Git repositories - fpgaboy.git/blame - insn_jr-jrcc.v
More sound haqery
[fpgaboy.git] / insn_jr-jrcc.v
CommitLineData
df770340
JW
1`ifdef EXECUTE
2 `INSN_JR_imm,`INSN_JRCC_imm: begin
3 case (cycle)
4 0: begin
5c33c5c0
JW
5 `EXEC_INC_PC
6 `EXEC_READ(`_PC + 1)
df770340 7 end
5c33c5c0
JW
8 1: begin
9 `EXEC_INC_PC
df770340
JW
10 if (opcode[5]) begin // i.e., JP cc,nn
11 /* We need to check the condition code to bail out. */
12 case (opcode[4:3])
5c33c5c0
JW
13 `INSN_cc_NZ: if (`_F[7]) `EXEC_NEWCYCLE
14 `INSN_cc_Z: if (~`_F[7]) `EXEC_NEWCYCLE
15 `INSN_cc_NC: if (`_F[4]) `EXEC_NEWCYCLE
16 `INSN_cc_C: if (~`_F[4]) `EXEC_NEWCYCLE
df770340
JW
17 endcase
18 end
19 end
5c33c5c0 20 2: `EXEC_NEWCYCLE
df770340
JW
21 endcase
22 end
23`endif
24
25`ifdef WRITEBACK
26 `INSN_JR_imm,`INSN_JRCC_imm: begin
27 case (cycle)
28 0: begin /* type F */ end
29 1: tmp <= rdata;
5c33c5c0 30 2: `_PC <= `_PC + {tmp[7]?8'hFF:8'h00,tmp};
df770340
JW
31 endcase
32 end
33`endif
This page took 0.033983 seconds and 4 git commands to generate.