From 8e17f07c295cec854d89cbf427bbd2f8dd915eda Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Wed, 24 Jan 2018 15:53:43 +0000 Subject: arch-arm: Arch regs and pseudo regs distinction A new identifier has been introduced: NUM_PHYS_MISCREGS, which is used as a boundary for the number of physical (real) Misc registers in the system. Pseudo registers (like CP15_UNIMPL) have been moved after the NUM_PHYS_MISCREGS identifier, so that their enum number is (NUM_PHYS_MISCREGS < number < NUM_MISCREGS). Moving away those registers has created some free slots that can be used for future Misc register implementation. SERIALIZE and UNSERIALIZE now only save/restore PHYSICAL Misc Registers. This allows us to define as many pseudo registers as we want without being concerned about checkpoint compatibility. Change-Id: I7e297b814eeaa4bee640e81bee625fb66710af45 Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/7921 Maintainer: Andreas Sandberg --- src/arch/arm/isa.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/arch/arm/isa.hh') diff --git a/src/arch/arm/isa.hh b/src/arch/arm/isa.hh index 1711ee0be..aa905e500 100644 --- a/src/arch/arm/isa.hh +++ b/src/arch/arm/isa.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012-2017 ARM Limited + * Copyright (c) 2010, 2012-2018 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -629,7 +629,7 @@ namespace ArmISA void serialize(CheckpointOut &cp) const { DPRINTF(Checkpoint, "Serializing Arm Misc Registers\n"); - SERIALIZE_ARRAY(miscRegs, NumMiscRegs); + SERIALIZE_ARRAY(miscRegs, NUM_PHYS_MISCREGS); SERIALIZE_SCALAR(highestELIs64); SERIALIZE_SCALAR(haveSecurity); @@ -641,7 +641,7 @@ namespace ArmISA void unserialize(CheckpointIn &cp) { DPRINTF(Checkpoint, "Unserializing Arm Misc Registers\n"); - UNSERIALIZE_ARRAY(miscRegs, NumMiscRegs); + UNSERIALIZE_ARRAY(miscRegs, NUM_PHYS_MISCREGS); CPSR tmp_cpsr = miscRegs[MISCREG_CPSR]; updateRegMap(tmp_cpsr); -- cgit v1.2.3