mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-11 04:05:37 +00:00
target-i386: Optimize setting dr[0-3]
If the debug register is not enabled, we need do nothing besides update the register. Backports commit 7525b55051277717329cf64a9e1d5cff840d6f38 from qemu
This commit is contained in:
parent
805e0ba7b2
commit
d1cfcb6d79
|
@ -227,9 +227,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 {
|
||||
|
|
Loading…
Reference in a new issue