Alec Roelke has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/23220 )

Change subject: arch-riscv: set MaxMiscDestRegs to 2
......................................................................

arch-riscv: set MaxMiscDestRegs to 2

In an earlier patch, the FCSR was split into its two components, FRM and
FFLAGS, causing explicit writes to FCSR to incur two CSR writes. With
the O3 CPU model, which defers them both to later, this creates a bug
where an assertion that the number of CSR writes must be less than
MaxMiscDestRegs fails because that constant is 1. This patch sets it to
2 so the O3 CPU is compatible with this scheme.

Change-Id: Ic3413738c4eebe9f127980d0d0af5033d18468e7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23220
Reviewed-by: Alec Roelke <alec.roe...@gmail.com>
Maintainer: Alec Roelke <alec.roe...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/riscv/registers.hh
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Alec Roelke: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/riscv/registers.hh b/src/arch/riscv/registers.hh
index 582a6c5..352c600 100644
--- a/src/arch/riscv/registers.hh
+++ b/src/arch/riscv/registers.hh
@@ -67,7 +67,7 @@

 using RiscvISAInst::MaxInstSrcRegs;
 using RiscvISAInst::MaxInstDestRegs;
-const int MaxMiscDestRegs = 1;
+const int MaxMiscDestRegs = 2;

 // Not applicable to RISC-V
 using VecElem = ::DummyVecElem;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/23220
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ic3413738c4eebe9f127980d0d0af5033d18468e7
Gerrit-Change-Number: 23220
Gerrit-PatchSet: 2
Gerrit-Owner: Alec Roelke <alec.roe...@gmail.com>
Gerrit-Reviewer: Alec Roelke <alec.roe...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to