arm: Mark some miscregs (timer counter) registers at unverifiable.
The checker can't verify timer registers, so it should just grab the version from the executing CPU, otherwise it could get a larger value and diverge execution.
This commit is contained in:
@@ -366,9 +366,12 @@ namespace Aarch64
|
||||
if (miscReg == MISCREG_DC_ZVA_Xt && !read)
|
||||
return new Dczva(machInst, rt, (IntRegIndex) miscReg, iss);
|
||||
|
||||
if (read)
|
||||
return new Mrs64(machInst, rt, (IntRegIndex) miscReg, iss);
|
||||
else
|
||||
if (read) {
|
||||
StaticInstPtr si = new Mrs64(machInst, rt, (IntRegIndex) miscReg, iss);
|
||||
if (miscRegInfo[miscReg][MISCREG_UNVERIFIABLE])
|
||||
si->setFlag(StaticInst::IsUnverifiable);
|
||||
return si;
|
||||
} else
|
||||
return new Msr64(machInst, (IntRegIndex) miscReg, rt, iss);
|
||||
} else if (miscRegInfo[miscReg][MISCREG_WARN_NOT_FAIL]) {
|
||||
std::string full_mnem = csprintf("%s %s",
|
||||
|
||||
@@ -273,8 +273,12 @@ let {{
|
||||
if (miscRegInfo[miscReg][MISCREG_IMPLEMENTED]) {
|
||||
uint32_t iss = mcrrMrrcIssBuild(isRead, crm, rt, rt2, opc1);
|
||||
|
||||
if (isRead)
|
||||
return new Mrrc15(machInst, miscReg, rt2, rt, iss);
|
||||
if (isRead) {
|
||||
StaticInstPtr si = new Mrrc15(machInst, miscReg, rt2, rt, iss);
|
||||
if (miscRegInfo[miscReg][MISCREG_UNVERIFIABLE])
|
||||
si->setFlag(StaticInst::IsUnverifiable);
|
||||
return si;
|
||||
}
|
||||
return new Mcrr15(machInst, rt2, rt, miscReg, iss);
|
||||
} else {
|
||||
return new FailUnimplemented(isRead ? "mrrc" : "mcrr", machInst,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -677,6 +677,8 @@ namespace ArmISA
|
||||
|
||||
enum MiscRegInfo {
|
||||
MISCREG_IMPLEMENTED,
|
||||
MISCREG_UNVERIFIABLE, // Does the value change on every read (e.g. a
|
||||
// arch generic counter)
|
||||
MISCREG_WARN_NOT_FAIL, // If MISCREG_IMPLEMENTED is deasserted, it
|
||||
// tells whether the instruction should raise a
|
||||
// warning or fail
|
||||
|
||||
Reference in New Issue
Block a user