let {{
sdivCode = '''
if (Op2.sw == 0) {
+ if (((SCTLR)Sctlr).dz) {
+#if FULL_SYSTEM
+ return new UndefinedInstruction;
+#else
+ return new UndefinedInstruction(false, mnemonic);
+#endif
+ }
Dest.sw = 0;
} else if (Op1.sw == INT_MIN && Op2.sw == -1) {
Dest.sw = INT_MIN;
udivCode = '''
if (Op2.uw == 0) {
+ if (((SCTLR)Sctlr).dz) {
+#if FULL_SYSTEM
+ return new UndefinedInstruction;
+#else
+ return new UndefinedInstruction(false, mnemonic);
+#endif
+ }
Dest.uw = 0;
} else {
Dest.uw = Op1.uw / Op2.uw;
'Fpsid': ('ControlReg', 'uw', 'MISCREG_FPSID', None, 2),
'Fpscr': ('ControlReg', 'uw', 'MISCREG_FPSCR', None, 2),
'Fpexc': ('ControlReg', 'uw', 'MISCREG_FPEXC', None, 2),
+ 'Sctlr': ('ControlReg', 'uw', 'MISCREG_SCTLR', None, 2),
'SevMailbox': ('ControlReg', 'uw', 'MISCREG_SEV_MAILBOX', None, 2),
'NPC': ('NPC', 'ud', None, (None, None, 'IsControl'), 2,
readNPC, writeNPC),