[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 6/8] target-i386: Optimize setting dr[0-3]
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 6/8] target-i386: Optimize setting dr[0-3] |
Date: |
Tue, 15 Sep 2015 11:45:11 -0700 |
If the debug register is not enabled, we need
do nothing besides update the register.
Signed-off-by: Richard Henderson <address@hidden>
---
target-i386/bpt_helper.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/target-i386/bpt_helper.c b/target-i386/bpt_helper.c
index 10bbf9f..f872387 100644
--- a/target-i386/bpt_helper.c
+++ b/target-i386/bpt_helper.c
@@ -226,9 +226,14 @@ void helper_movl_drN_T0(CPUX86State *env, int reg,
target_ulong t0)
{
#ifndef CONFIG_USER_ONLY
if (reg < 4) {
- hw_breakpoint_remove(env, reg);
- env->dr[reg] = t0;
- hw_breakpoint_insert(env, reg);
+ if (hw_breakpoint_enabled(env->dr[7], reg)
+ && hw_breakpoint_type(env->dr[7], reg) != DR7_TYPE_IO_RW) {
+ hw_breakpoint_remove(env, reg);
+ env->dr[reg] = t0;
+ hw_breakpoint_insert(env, reg);
+ } else {
+ env->dr[reg] = t0;
+ }
} else if (reg == 7) {
cpu_x86_update_dr7(env, t0);
} else {
--
2.1.0
- [Qemu-devel] [PATCH 0/8] target-i386: Implement debug extensions, Richard Henderson, 2015/09/15
- [Qemu-devel] [PATCH 5/8] target-i386: Move hw_*breakpoint_* functions, Richard Henderson, 2015/09/15
- [Qemu-devel] [PATCH 6/8] target-i386: Optimize setting dr[0-3],
Richard Henderson <=
- [Qemu-devel] [PATCH 8/8] target-i386: Check CR4[DE] for processing DR4/DR5, Richard Henderson, 2015/09/15
- [Qemu-devel] [PATCH 7/8] target-i386: Handle I/O breakpoints, Richard Henderson, 2015/09/15
- [Qemu-devel] [PATCH 1/8] target-i386: Move breakpoint related functions to new file, Richard Henderson, 2015/09/15
- Re: [Qemu-devel] [PATCH 0/8] target-i386: Implement debug extensions, Paolo Bonzini, 2015/09/21