mipsym / MIPSym-issues

Issue tracker for MIPSym simulator for the MIPS R2000 assembly language
0 stars 0 forks source link

Restart in Delay slot mode is broken #6

Open RogerWDoering opened 1 year ago

RogerWDoering commented 1 year ago

Describe the bug The first time that delay slot code is run, it works fine. After an exit, if the code is run again, something goes wrong with the PC, and after a branch the PC starts fetching code after the syscall exit that terminated the previous run.

To Reproduce Steps to reproduce the behavior: Fresh launch MIPSym run any delay slot code twice build and single step through code. Then try it a second time. Wierd PC/ INST values

Assembly Source Code that Causes the Problem

Please write your code here between the two rows of backticks:

.delay
    addi    $t0,$0,1
    beqz    $t0,1f
    nop
1:  jr  $ra 

Expected behavior I would expect the same behavior on a second execution as the first. Something about PC[0],PC[1] and PC[2) not being re-initialized. Screenshots image

Platform(s) affected (type an 'X' between the square brackets):

Program(s) affected (type an 'X' between the square brackets):

MIPSym Version Affected: 2.05.1520, and probably earlier.

Additional context Add any other context about the problem here.