diff options
Diffstat (limited to 'src/arch/x86/isa.cc')
-rw-r--r-- | src/arch/x86/isa.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/arch/x86/isa.cc b/src/arch/x86/isa.cc index 213a9e2e3..ad7248841 100644 --- a/src/arch/x86/isa.cc +++ b/src/arch/x86/isa.cc @@ -129,13 +129,7 @@ ISA::readMiscRegNoEffect(int miscReg) const // Make sure we're not dealing with an illegal control register. // Instructions should filter out these indexes, and nothing else should // attempt to read them directly. - assert(miscReg >= MISCREG_CR0 && - miscReg < NUM_MISCREGS && - miscReg != MISCREG_CR1 && - !(miscReg > MISCREG_CR4 && - miscReg < MISCREG_CR8) && - !(miscReg > MISCREG_CR8 && - miscReg <= MISCREG_CR15)); + assert(isValidMiscReg(miscReg)); return regVal[miscReg]; } @@ -162,13 +156,7 @@ ISA::setMiscRegNoEffect(int miscReg, MiscReg val) // Make sure we're not dealing with an illegal control register. // Instructions should filter out these indexes, and nothing else should // attempt to write to them directly. - assert(miscReg >= MISCREG_CR0 && - miscReg < NUM_MISCREGS && - miscReg != MISCREG_CR1 && - !(miscReg > MISCREG_CR4 && - miscReg < MISCREG_CR8) && - !(miscReg > MISCREG_CR8 && - miscReg <= MISCREG_CR15)); + assert(isValidMiscReg(miscReg)); HandyM5Reg m5Reg = readMiscRegNoEffect(MISCREG_M5_REG); switch (miscReg) { |