arm: Squash after returning from exceptions in v7
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.
This commit is contained in:
parent
aa674268e9
commit
c0d19391d4
3 changed files with 8 additions and 5 deletions
|
@ -273,10 +273,12 @@ let {{
|
|||
'''
|
||||
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;")
|
||||
|
|
|
@ -124,7 +124,7 @@ let {{
|
|||
'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',
|
||||
|
@ -668,7 +668,7 @@ let {{
|
|||
{'code': microRetUopCode % 'URb',
|
||||
'predicate_test': predicateTest},
|
||||
['IsMicroop', 'IsNonSpeculative',
|
||||
'IsSerializeAfter'])
|
||||
'IsSerializeAfter', 'IsSquashAfter'])
|
||||
|
||||
setPCCPSRDecl = '''
|
||||
CPSR cpsrOrCondCodes = URc;
|
||||
|
|
|
@ -130,7 +130,8 @@ let {{
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue