Ian Jiang has uploaded this change for review. ( 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 <ianjiang....@gmail.com>
---
M src/arch/riscv/utility.hh
1 file changed, 4 insertions(+), 0 deletions(-)



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: 1
Gerrit-Owner: Ian Jiang <ianjiang....@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to