Properly done for the ERET instruction in v8, but not for v7.
Many control register changes are only visible after explicit
instruction synchronization barriers or exception entry/exit.
This means mode changing instructions should squash any
younger in-flight speculative instructions.
'''
buildImmDataInst(mnem + 's', code, flagType,
suffix = "ImmPclr", buildCc = False,
- instFlags = ["IsSerializeAfter","IsNonSpeculative"])
+ instFlags = ["IsSerializeAfter","IsNonSpeculative",
+ "IsSquashAfter"])
buildRegDataInst(mnem + 's', code, flagType,
suffix = "RegPclr", buildCc = False,
- instFlags = ["IsSerializeAfter","IsNonSpeculative"])
+ instFlags = ["IsSerializeAfter","IsNonSpeculative",
+ "IsSquashAfter"])
buildDataInst("and", "Dest = resTemp = Op1 & secondOp;")
buildDataInst("eor", "Dest = resTemp = Op1 ^ secondOp;")
'EA = URb + (up ? imm : -imm);',
'predicate_test': condPredicateTest},
['IsMicroop','IsNonSpeculative',
- 'IsSerializeAfter'])
+ 'IsSerializeAfter', 'IsSquashAfter'])
microStrUopCode = "Mem = cSwap(URa_uw, ((CPSR)Cpsr).e);"
microStrUopIop = InstObjParams('str_uop', 'MicroStrUop',
{'code': microRetUopCode % 'URb',
'predicate_test': predicateTest},
['IsMicroop', 'IsNonSpeculative',
- 'IsSerializeAfter'])
+ 'IsSerializeAfter', 'IsSquashAfter'])
setPCCPSRDecl = '''
CPSR cpsrOrCondCodes = URc;
eretIop = InstObjParams("eret", "Eret", "PredOp",
{ "code": eretCode,
"predicate_test": predicateTest },
- ["IsNonSpeculative", "IsSerializeAfter"])
+ ["IsNonSpeculative", "IsSerializeAfter",
+ "IsSquashAfter"])
header_output += BasicDeclare.subst(eretIop)
decoder_output += BasicConstructor.subst(eretIop)
exec_output += PredOpExecute.subst(eretIop)