From 4476dea8f8c2db20187df7e3608b07ece7f3287e Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Mon, 8 Aug 2011 05:47:49 +0000 Subject: [PATCH] remove redundant code --- bochs/cpu/crregs.cc | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/bochs/cpu/crregs.cc b/bochs/cpu/crregs.cc index b911fcc6b..0087f87af 100644 --- a/bochs/cpu/crregs.cc +++ b/bochs/cpu/crregs.cc @@ -69,8 +69,8 @@ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_DdRd(bxInstruction_c *i) case 1: // DR1 case 2: // DR2 case 3: // DR3 - TLB_invlpg(val_32); BX_CPU_THIS_PTR dr[i->nnn()] = val_32; + TLB_invlpg(val_32); break; 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) 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 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 2: // DR2 case 3: // DR3 - TLB_invlpg(val_64); BX_CPU_THIS_PTR dr[i->nnn()] = val_64; + TLB_invlpg(val_64); break; 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) 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 TLB_flush(); // the DR7 write could enable some breakpoints