Skip to content

Commit

Permalink
Fix backstepper for CSRs and Floating point registers
Browse files Browse the repository at this point in the history
The bug was introduced in eaf9557#diff-099c4644aabc3b2bb9342c4e4ac331a2
  • Loading branch information
TheThirdOne committed May 17, 2019
1 parent c762e55 commit 3054cbb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rars/simulator/BackStepper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import rars.Globals;
import rars.ProgramStatement;
import rars.riscv.hardware.ControlAndStatusRegisterFile;
import rars.riscv.hardware.FloatingPointRegisterFile;
import rars.riscv.hardware.RegisterFile;
import rars.riscv.Instruction;

Expand Down Expand Up @@ -147,6 +149,12 @@ public void backStep() {
case REGISTER_RESTORE:
RegisterFile.updateRegister(step.param1, step.param2);
break;
case FLOATING_POINT_REGISTER_RESTORE:
FloatingPointRegisterFile.updateRegister(step.param1,step.param2);
break;
case CONTROL_AND_STATUS_REGISTER_RESTORE:
ControlAndStatusRegisterFile.updateRegister(step.param1,step.param2);
break;
case PC_RESTORE:
RegisterFile.setProgramCounter(step.param1);
break;
Expand Down

0 comments on commit 3054cbb

Please sign in to comment.