aboutsummaryrefslogtreecommitdiff
path: root/design
diff options
context:
space:
mode:
Diffstat (limited to 'design')
-rw-r--r--design/stack_machine.v7
1 files changed, 7 insertions, 0 deletions
diff --git a/design/stack_machine.v b/design/stack_machine.v
index 5e6e0d6..b5c56e6 100644
--- a/design/stack_machine.v
+++ b/design/stack_machine.v
@@ -201,6 +201,10 @@ module stack_machine_new
assign instr_jump = use_im && stack_same_size &&
instruction[11:7] == 5'd1;
+ wire instr_add_sp;
+ assign instr_add_sp = use_im && stack_same_size &&
+ instruction[11:7] == 5'd2;
+
/* Instructions, that grow stack */
wire instr_tee;
assign instr_tee = !set_im && !use_im && stack_grows &&
@@ -533,6 +537,9 @@ module stack_machine_new
if (instr_set_sp)
`SET_SP(im_effective);
+ if (instr_add_sp)
+ `SET_SP(im_effective + sp);
+
if (instr_jump)
`SET_PC(im_effective);