arch-arm: Replace 0ing of miscRegs with assignment of reset value
The reset variable in the MiscRegLUTEntry class defines the per-register reset value. Rather than simply zeroing the misc registers we should assign them their reset value when clearing them. As of now the reset variable is unused so using it is functionally equivalent of calling memset. This will however change once we start using the reset field Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Change-Id: If352501738729927c1c9b300e5b0b8c27ce41b79 Reviewed-by: Richard Cooper <richard.cooper@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/70457 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
@@ -141,7 +141,9 @@ ISA::clear()
|
||||
}
|
||||
|
||||
SCTLR sctlr_rst = miscRegs[MISCREG_SCTLR_RST];
|
||||
memset(miscRegs, 0, sizeof(miscRegs));
|
||||
for (auto idx = 0; idx < NUM_MISCREGS; idx++) {
|
||||
miscRegs[idx] = lookUpMiscReg[idx].reset();
|
||||
}
|
||||
|
||||
initID32(p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user