Move macro defines out to files
[fpgaboy.git] / core / insn_push_reg.v
CommitLineData
e7fe9dc2
JW
1`define INSN_PUSH_reg 9'b011xx0101
2
81358c71
JW
3`ifdef EXECUTE
4 `INSN_PUSH_reg: begin /* PUSH is 16 cycles! */
5 case (cycle)
5c33c5c0
JW
6 0: case (opcode[5:4])
7 `INSN_stack_AF: `EXEC_WRITE(`_SP - 1, `_A)
8 `INSN_stack_BC: `EXEC_WRITE(`_SP - 1, `_B)
9 `INSN_stack_DE: `EXEC_WRITE(`_SP - 1, `_D)
10 `INSN_stack_HL: `EXEC_WRITE(`_SP - 1, `_H)
11 endcase
12 1: case (opcode[5:4])
6c46357c
JW
13 `INSN_stack_AF: `EXEC_WRITE(`_SP - 2, `_F)
14 `INSN_stack_BC: `EXEC_WRITE(`_SP - 2, `_C)
15 `INSN_stack_DE: `EXEC_WRITE(`_SP - 2, `_E)
16 `INSN_stack_HL: `EXEC_WRITE(`_SP - 2, `_L)
5c33c5c0 17 endcase
81358c71
JW
18 2: begin /* Twiddle thumbs. */ end
19 3: begin
5c33c5c0
JW
20 `EXEC_NEWCYCLE
21 `EXEC_INC_PC
81358c71
JW
22 end
23 endcase
24 end
25`endif
26
27`ifdef WRITEBACK
28 `INSN_PUSH_reg: begin /* PUSH is 16 cycles! */
29 case (cycle)
30 0: begin /* type F */ end
31 1: begin /* type F */ end
32 2: begin /* type F */ end
5c33c5c0 33 3: `_SP <= `_SP - 2;
81358c71
JW
34 endcase
35 end
36`endif
This page took 0.030137 seconds and 4 git commands to generate.