if (fault != NoFault) return fault;
'''
- mrsCode = '''
+ msr_check_code = '''
+ MiscRegIndex flat_idx = (MiscRegIndex) xc->tcBase()->
+ flattenRegId(RegId(MiscRegClass, dest)).index();
+ CPSR cpsr = Cpsr;
+ ExceptionLevel el = (ExceptionLevel) (uint8_t) cpsr.el;
+ %s
+ ''' % (msrMrs64EnabledCheckCode % ('Write'),)
+
+ mrs_check_code = '''
MiscRegIndex flat_idx = (MiscRegIndex) xc->tcBase()->
flattenRegId(RegId(MiscRegClass, op1)).index();
CPSR cpsr = Cpsr;
ExceptionLevel el = (ExceptionLevel) (uint8_t) cpsr.el;
%s
- XDest = MiscOp1_ud;
''' % (msrMrs64EnabledCheckCode % ('Read'),)
+
+ mrsCode = mrs_check_code + '''
+ XDest = MiscOp1_ud;
+ '''
mrsIop = InstObjParams("mrs", "Mrs64", "RegMiscRegImmOp64",
mrsCode,
["IsSerializeBefore"])
XDest = cpsr;
''')
- msrCode = '''
- MiscRegIndex flat_idx = (MiscRegIndex) xc->tcBase()->
- flattenRegId(RegId(MiscRegClass, dest)).index();
- CPSR cpsr = Cpsr;
- ExceptionLevel el = (ExceptionLevel) (uint8_t) cpsr.el;
- %s
+ msrCode = msr_check_code + '''
MiscDest_ud = XOp1;
- ''' % (msrMrs64EnabledCheckCode % ('Write'),)
-
+ '''
msrIop = InstObjParams("msr", "Msr64", "MiscRegRegImmOp64",
msrCode,
["IsSerializeAfter", "IsNonSpeculative"])
CondCodesV = cpsr.v;
''')
- msr_check_code = '''
- MiscRegIndex flat_idx = (MiscRegIndex) xc->tcBase()->
- flattenRegId(RegId(MiscRegClass, dest)).index();
- CPSR cpsr = Cpsr;
- ExceptionLevel el = (ExceptionLevel) (uint8_t) cpsr.el;
- %s
- ''' % (msrMrs64EnabledCheckCode % ('Write'),)
-
msrdczva_ea_code = msr_check_code
msrdczva_ea_code += '''