frroossst / py_mips_debugger

A minimal MIPS python interpreter that allows for easy debugging and improved developer workflow
https://frroossst.github.io/py_mips_debugger/
GNU General Public License v3.0
0 stars 0 forks source link

jal shouldn't return unless there is a jr $ra #32

Closed frroossst closed 1 year ago

frroossst commented 1 year ago

jal's behavior rn is such that it acts like a function call regardless of there being a jr instruction in the procedure that is called, this is a bug and should be fixes

frroossst commented 1 year ago

fixed some things with 51e8ec8d840ce93cc3365440be4608485b497be9

but, due to how the interpreter loop stacks up label execution, execution is started from index 0 of the label rather than at the index in $ra to fix this, there needs to be a check in the main loop to continue blank execution until the params of the x & i of the main loop match up with $ra