diff options
author | Wojciech Kosior <kwojtus@protonmail.com> | 2020-10-05 14:23:47 +0200 |
---|---|---|
committer | Wojciech Kosior <kwojtus@protonmail.com> | 2020-10-05 14:24:00 +0200 |
commit | 7ddb4265d30ef30df6e7098c979334109378357c (patch) | |
tree | 95e9f5785ba5f46c8a362d6600e843363ac1fcf1 /design | |
parent | 7a61f213fb9be8ab7f9bd0fb33940b21fa143b05 (diff) | |
download | AGH-engineering-thesis-7ddb4265d30ef30df6e7098c979334109378357c.tar.gz AGH-engineering-thesis-7ddb4265d30ef30df6e7098c979334109378357c.zip |
fixes, add_sp instruciton and translation of br instruction from wasm
Diffstat (limited to 'design')
-rw-r--r-- | design/stack_machine.v | 7 |
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); |