aboutsummaryrefslogtreecommitdiff
path: root/design/stack_machine.v
diff options
context:
space:
mode:
Diffstat (limited to 'design/stack_machine.v')
-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 a6b2765..150f6c7 100644
--- a/design/stack_machine.v
+++ b/design/stack_machine.v
@@ -190,6 +190,10 @@ module stack_machine_new
assign instr_set_sp = use_im && stack_same_size &&
instruction[11:7] == 5'd0;
+ wire instr_jump;
+ assign instr_jump = use_im && stack_same_size &&
+ instruction[11:7] == 5'd1;
+
/* Instructions, that grow stack */
wire instr_tee;
assign instr_tee = !set_im && !use_im && stack_grows &&
@@ -493,6 +497,9 @@ module stack_machine_new
if (instr_set_sp)
`SET_SP(im_effective);
+ if (instr_jump)
+ `SET_PC(im_effective);
+
/* Instructions, that grow stack */
if (instr_tee)
r1 <= r1;