early checking for v86 mode protection violation of special fullcore opcodes
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3131
This commit is contained in:
parent
f209b02e6b
commit
434cc5408b
4 changed files with 7 additions and 7 deletions
|
@ -6,6 +6,9 @@ switch (inst.code.load) {
|
|||
case L_POPdRM:
|
||||
inst_op1_d = Pop_32();
|
||||
goto case_L_MODRM;
|
||||
case L_MODRM_NVM:
|
||||
if ((reg_flags & FLAG_VM) || !cpu.pmode) goto illegalopcode;
|
||||
goto case_L_MODRM;
|
||||
case_L_MODRM:
|
||||
case L_MODRM:
|
||||
inst.rm=Fetchb();
|
||||
|
|
|
@ -459,7 +459,6 @@ switch (inst.code.op) {
|
|||
break;
|
||||
case O_LAR:
|
||||
{
|
||||
if ((reg_flags & FLAG_VM) || (!cpu.pmode)) goto illegalopcode;
|
||||
Bitu ar=inst_op2_d;
|
||||
CPU_LAR(inst_op1_w,ar);
|
||||
inst_op1_d=(Bit32u)ar;
|
||||
|
@ -467,7 +466,6 @@ switch (inst.code.op) {
|
|||
break;
|
||||
case O_LSL:
|
||||
{
|
||||
if ((reg_flags & FLAG_VM) || (!cpu.pmode)) goto illegalopcode;
|
||||
Bitu limit=inst_op2_d;
|
||||
CPU_LSL(inst_op1_w,limit);
|
||||
inst_op1_d=(Bit32u)limit;
|
||||
|
@ -475,7 +473,6 @@ switch (inst.code.op) {
|
|||
break;
|
||||
case O_ARPL:
|
||||
{
|
||||
if ((reg_flags & FLAG_VM) || !cpu.pmode) goto illegalopcode;
|
||||
Bitu new_sel=inst_op1_d;
|
||||
CPU_ARPL(new_sel,inst_op2_d);
|
||||
inst_op1_d=(Bit32u)new_sel;
|
||||
|
|
|
@ -69,7 +69,7 @@ static OpCode OpCodeTable[1024]={
|
|||
|
||||
/* 0x60 - 0x67 */
|
||||
{D_PUSHAw ,0 ,0 ,0 },{D_POPAw ,0 ,0 ,0 },
|
||||
{L_MODRM ,O_BOUNDw ,0 ,M_Gw },{L_MODRM ,O_ARPL ,S_Ew ,M_EwGw },
|
||||
{L_MODRM ,O_BOUNDw ,0 ,M_Gw },{L_MODRM_NVM ,O_ARPL ,S_Ew ,M_EwGw },
|
||||
{L_PRESEG ,0 ,0 ,fs },{L_PRESEG ,0 ,0 ,gs },
|
||||
{L_PREOP ,0 ,0 ,0 },{L_PREADD ,0 ,0 ,0 },
|
||||
/* 0x68 - 0x6f */
|
||||
|
@ -183,7 +183,7 @@ static OpCode OpCodeTable[1024]={
|
|||
|
||||
/* 0x100 - 0x107 */
|
||||
{L_MODRM ,O_GRP6w ,S_Ew ,M_Ew },{L_MODRM ,O_GRP7w ,S_Ew ,M_Ew },
|
||||
{L_MODRM ,O_LAR ,S_Gw ,M_EwGw },{L_MODRM ,O_LSL ,S_Gw ,M_EwGw },
|
||||
{L_MODRM_NVM ,O_LAR ,S_Gw ,M_EwGw },{L_MODRM_NVM ,O_LSL ,S_Gw ,M_EwGw },
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
{D_CLTS ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
/* 0x108 - 0x10f */
|
||||
|
@ -539,7 +539,7 @@ static OpCode OpCodeTable[1024]={
|
|||
|
||||
/* 0x300 - 0x307 */
|
||||
{L_MODRM ,O_GRP6d ,S_Ew ,M_Ew },{L_MODRM ,O_GRP7d ,S_Ew ,M_Ew },
|
||||
{L_MODRM ,O_LAR ,S_Gd ,M_EdGd },{L_MODRM ,O_LSL ,S_Gd ,M_EdGd },
|
||||
{L_MODRM_NVM ,O_LAR ,S_Gd ,M_EdGd },{L_MODRM_NVM ,O_LSL ,S_Gd ,M_EdGd },
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
{D_CLTS ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
/* 0x308 - 0x30f */
|
||||
|
|
|
@ -2,7 +2,7 @@ enum {
|
|||
L_N=0,
|
||||
L_SKIP,
|
||||
/* Grouped ones using MOD/RM */
|
||||
L_MODRM,L_POPwRM,L_POPdRM,
|
||||
L_MODRM,L_MODRM_NVM,L_POPwRM,L_POPdRM,
|
||||
|
||||
L_Ib,L_Iw,L_Id,
|
||||
L_Ibx,L_Iwx,L_Idx, //Sign extend
|
||||
|
|
Loading…
Add table
Reference in a new issue