Ian Jiang has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/32934 )

Change subject: arch-riscv: Add float registers in copyRegs
......................................................................

arch-riscv: Add float registers in copyRegs

The origin copyRegs() does not include float registers.
This patch fixes the problem.

Change-Id: If4ad04b1eda6035486197879ff3e04ff32dd87bb
Signed-off-by: Ian Jiang <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32934
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/riscv/utility.hh
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/riscv/utility.hh b/src/arch/riscv/utility.hh
index 32eaff6..d4cf221 100644
--- a/src/arch/riscv/utility.hh
+++ b/src/arch/riscv/utility.hh
@@ -127,6 +127,10 @@
     for (int i = 0; i < NumIntRegs; ++i)
         dest->setIntReg(i, src->readIntReg(i));

+    // Second loop through the float registers.
+    for (int i = 0; i < NumFloatRegs; ++i)
+        dest->setFloatReg(i, src->readFloatReg(i));
+
     // Lastly copy PC/NPC
     dest->pcState(src->pcState());
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32934
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: If4ad04b1eda6035486197879ff3e04ff32dd87bb
Gerrit-Change-Number: 32934
Gerrit-PatchSet: 2
Gerrit-Owner: Ian Jiang <[email protected]>
Gerrit-Reviewer: Alec Roelke <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Ian Jiang <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
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