remove redundant code

This commit is contained in:
Stanislav Shwartsman 2011-08-08 05:47:49 +00:00
parent bce6a17b98
commit 4476dea8f8

View File

@ -69,8 +69,8 @@ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_DdRd(bxInstruction_c *i)
case 1: // DR1 case 1: // DR1
case 2: // DR2 case 2: // DR2
case 3: // DR3 case 3: // DR3
TLB_invlpg(val_32);
BX_CPU_THIS_PTR dr[i->nnn()] = val_32; BX_CPU_THIS_PTR dr[i->nnn()] = val_32;
TLB_invlpg(val_32);
break; break;
case 4: // DR4 case 4: // DR4
@ -114,19 +114,6 @@ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_DdRd(bxInstruction_c *i)
// Instruction breakpoint with LENx not 00b (1-byte length) // Instruction breakpoint with LENx not 00b (1-byte length)
BX_ERROR(("MOV_DdRd: write of %08x, R/W=00b LEN!=00b", val_32)); BX_ERROR(("MOV_DdRd: write of %08x, R/W=00b LEN!=00b", val_32));
} }
// if we have code breakpoints enabled then we must check
// breakpoints condition in cpu loop
if (BX_CPU_THIS_PTR dr7.get_bp_enabled()) {
if (BX_CPU_THIS_PTR dr7.get_R_W0() == 0 ||
BX_CPU_THIS_PTR dr7.get_R_W1() == 0 ||
BX_CPU_THIS_PTR dr7.get_R_W2() == 0 ||
BX_CPU_THIS_PTR dr7.get_R_W3() == 0)
{
BX_INFO(("MOV_DdRd(): code breakpoint is set"));
BX_CPU_THIS_PTR async_event = 1;
}
}
#endif #endif
TLB_flush(); // the DR7 write could enable some breakpoints TLB_flush(); // the DR7 write could enable some breakpoints
@ -256,8 +243,8 @@ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_DqRq(bxInstruction_c *i)
case 1: // DR1 case 1: // DR1
case 2: // DR2 case 2: // DR2
case 3: // DR3 case 3: // DR3
TLB_invlpg(val_64);
BX_CPU_THIS_PTR dr[i->nnn()] = val_64; BX_CPU_THIS_PTR dr[i->nnn()] = val_64;
TLB_invlpg(val_64);
break; break;
case 4: // DR4 case 4: // DR4
@ -299,19 +286,6 @@ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_DqRq(bxInstruction_c *i)
// Instruction breakpoint with LENx not 00b (1-byte length) // Instruction breakpoint with LENx not 00b (1-byte length)
BX_ERROR(("MOV_DqRq: write of %08x, R/W=00b LEN!=00b", BX_CPU_THIS_PTR dr7.get32())); BX_ERROR(("MOV_DqRq: write of %08x, R/W=00b LEN!=00b", BX_CPU_THIS_PTR dr7.get32()));
} }
// if we have code breakpoints enabled then we must check
// breakpoints condition in cpu loop
if (BX_CPU_THIS_PTR dr7.get_bp_enabled()) {
if (BX_CPU_THIS_PTR dr7.get_R_W0() == 0 ||
BX_CPU_THIS_PTR dr7.get_R_W1() == 0 ||
BX_CPU_THIS_PTR dr7.get_R_W2() == 0 ||
BX_CPU_THIS_PTR dr7.get_R_W3() == 0)
{
BX_INFO(("MOV_DdRd(): code breakpoint is set"));
BX_CPU_THIS_PTR async_event = 1;
}
}
#endif #endif
TLB_flush(); // the DR7 write could enable some breakpoints TLB_flush(); // the DR7 write could enable some breakpoints