From 209b450062df1c72fdf86ef43efc57273a471735 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sun, 20 Oct 2002 10:42:37 +0000 Subject: [PATCH] Added some safety defaults in switches Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@384 --- src/cpu/core_16/prefix_66_of.h | 4 ++++ src/cpu/core_16/prefix_of.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/cpu/core_16/prefix_66_of.h b/src/cpu/core_16/prefix_66_of.h index 676f0007..c7b0f81f 100644 --- a/src/cpu/core_16/prefix_66_of.h +++ b/src/cpu/core_16/prefix_66_of.h @@ -79,6 +79,8 @@ switch (Fetchb()) { if (flags.cf) *eard&=~mask; else *eard|=mask; break; + default: + E_Exit("CPU:66:0F:BA:Illegal subfunction %X",rm & 0x38); } } else { GetEAa;Bit32u old=LoadMd(eaa); @@ -98,6 +100,8 @@ switch (Fetchb()) { else old|=mask; SaveMd(eaa,old); break; + default: + E_Exit("CPU:66:0F:BA:Illegal subfunction %X",rm & 0x38); } } if (flags.type!=t_CF) flags.prev_type=flags.type; diff --git a/src/cpu/core_16/prefix_of.h b/src/cpu/core_16/prefix_of.h index 3decea1f..3e3a4b4b 100644 --- a/src/cpu/core_16/prefix_of.h +++ b/src/cpu/core_16/prefix_of.h @@ -314,6 +314,8 @@ switch(Fetchb()) { case 0x38: /* BTC */ *earw^=mask; break; + default: + E_Exit("CPU:0F:BA:Illegal subfunction %X",rm & 0x38); } } else { GetEAa;Bit16u old=LoadMw(eaa); @@ -330,6 +332,8 @@ switch(Fetchb()) { case 0x38: /* BTC */ SaveMw(eaa,old ^ mask); break; + default: + E_Exit("CPU:0F:BA:Illegal subfunction %X",rm & 0x38); } } if (flags.type!=t_CF) { flags.prev_type=flags.type;flags.type=t_CF; }