From cfc4a999828a5b51f4c514e3a7c47b4eebc450b9 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 24 Jan 2014 15:29:30 -0600 Subject: arch: Make all register index flattening const This patch makes all the register index flattening methods const for all the ISAs. As part of this, readMiscRegNoEffect for ARM is also made const. --- src/arch/arm/isa.cc | 2 +- src/arch/arm/isa.hh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/arch/arm') diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc index 2b67e6cf6..86be2803d 100644 --- a/src/arch/arm/isa.cc +++ b/src/arch/arm/isa.cc @@ -177,7 +177,7 @@ ISA::clear() } MiscReg -ISA::readMiscRegNoEffect(int misc_reg) +ISA::readMiscRegNoEffect(int misc_reg) const { assert(misc_reg < NumMiscRegs); diff --git a/src/arch/arm/isa.hh b/src/arch/arm/isa.hh index 6fd57549a..c747fc770 100644 --- a/src/arch/arm/isa.hh +++ b/src/arch/arm/isa.hh @@ -96,13 +96,13 @@ namespace ArmISA public: void clear(); - MiscReg readMiscRegNoEffect(int misc_reg); + MiscReg readMiscRegNoEffect(int misc_reg) const; MiscReg readMiscReg(int misc_reg, ThreadContext *tc); void setMiscRegNoEffect(int misc_reg, const MiscReg &val); void setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc); int - flattenIntIndex(int reg) + flattenIntIndex(int reg) const { assert(reg >= 0); if (reg < NUM_ARCH_INTREGS) { @@ -135,20 +135,20 @@ namespace ArmISA } int - flattenFloatIndex(int reg) + flattenFloatIndex(int reg) const { return reg; } // dummy int - flattenCCIndex(int reg) + flattenCCIndex(int reg) const { return reg; } int - flattenMiscIndex(int reg) + flattenMiscIndex(int reg) const { if (reg == MISCREG_SPSR) { int spsr_idx = NUM_MISCREGS; -- cgit v1.2.3