From 3054cbb76488ca0e7c3d64d6a3146467a976587b Mon Sep 17 00:00:00 2001 From: Benjamin Landers Date: Thu, 16 May 2019 21:06:07 -0700 Subject: [PATCH] Fix backstepper for CSRs and Floating point registers The bug was introduced in eaf9557beedef3b3608da7c1aec3ba8c5c1ee0f6#diff-099c4644aabc3b2bb9342c4e4ac331a2 --- rars/simulator/BackStepper.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rars/simulator/BackStepper.java b/rars/simulator/BackStepper.java index 3067e688..c226c1da 100644 --- a/rars/simulator/BackStepper.java +++ b/rars/simulator/BackStepper.java @@ -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; @@ -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;