Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/49769 )

Change subject: arch-sparc: Revamp the float registers.
......................................................................

arch-sparc: Revamp the float registers.

Change-Id: Iec52e15f1529319345795496a82a37e1f0aeebae
---
M src/arch/sparc/isa.cc
M src/arch/sparc/regs/float.hh
2 files changed, 10 insertions(+), 5 deletions(-)



diff --git a/src/arch/sparc/isa.cc b/src/arch/sparc/isa.cc
index 453d493..3d867a4 100644
--- a/src/arch/sparc/isa.cc
+++ b/src/arch/sparc/isa.cc
@@ -71,7 +71,7 @@
 ISA::ISA(const Params &p) : BaseISA(p)
 {
     _regClasses.emplace_back(int_reg::NumRegs, debug::IntRegs);
-    _regClasses.emplace_back(NumFloatRegs, debug::FloatRegs);
+    _regClasses.emplace_back(float_reg::NumRegs, debug::FloatRegs);
_regClasses.emplace_back(1, debug::IntRegs); // Not applicable for SPARC _regClasses.emplace_back(2, debug::IntRegs); // Not applicable for SPARC _regClasses.emplace_back(1, debug::IntRegs); // Not applicable for SPARC
@@ -253,8 +253,9 @@


     // Then loop through the floating point registers.
-    for (int i = 0; i < SparcISA::NumFloatArchRegs; ++i) {
-        tc->setFloatReg(i, src->readFloatReg(i));
+    for (int i = 0; i < SparcISA::float_reg::NumArchRegs; ++i) {
+        RegId reg(FloatRegClass, i);
+        tc->setReg(reg, src->getReg(reg));
     }

     // Copy misc. registers
diff --git a/src/arch/sparc/regs/float.hh b/src/arch/sparc/regs/float.hh
index 3588090..78f4db5 100644
--- a/src/arch/sparc/regs/float.hh
+++ b/src/arch/sparc/regs/float.hh
@@ -35,9 +35,13 @@
 namespace SparcISA
 {

-const int NumFloatRegs = 64;
-const int NumFloatArchRegs = NumFloatRegs;
+namespace float_reg
+{

+const int NumRegs = 64;
+const int NumArchRegs = NumRegs;
+
+} // namespace float_reg
 } // namespace SparcISA
 } // namespace gem5


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

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Iec52e15f1529319345795496a82a37e1f0aeebae
Gerrit-Change-Number: 49769
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to