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.ict@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32934
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ian Jiang
2020-08-19 16:19:33 +08:00
parent f1840c9951
commit 03976aa582

View File

@@ -127,6 +127,10 @@ copyRegs(ThreadContext *src, ThreadContext *dest)
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());
}