diff options
author | liguang <lig.fnst@cn.fujitsu.com> | 2013-01-15 13:39:55 +0800 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-01-15 09:14:35 +0100 |
commit | 428065ce50643a56bff043501809b62b035f0b17 (patch) | |
tree | 0e854bab9efea8205eae804dd5a3c5860e2c40e7 /target-i386/seg_helper.c | |
parent | 5ec01c2e96910e1588d1a0de8609b9dda7618c7f (diff) |
target-i386: Define DR7 bit field constants
Implicit use of dr7 bit field is a little hard to understand,
so define constants for them and use them consistently.
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386/seg_helper.c')
-rw-r--r-- | target-i386/seg_helper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c index c2a99ee9bc..c40bd964c0 100644 --- a/target-i386/seg_helper.c +++ b/target-i386/seg_helper.c @@ -465,13 +465,13 @@ static void switch_tss(CPUX86State *env, int tss_selector, #ifndef CONFIG_USER_ONLY /* reset local breakpoints */ - if (env->dr[7] & 0x55) { - for (i = 0; i < 4; i++) { + if (env->dr[7] & DR7_LOCAL_BP_MASK) { + for (i = 0; i < DR7_MAX_BP; i++) { if (hw_breakpoint_enabled(env->dr[7], i) == 0x1) { hw_breakpoint_remove(env, i); } } - env->dr[7] &= ~0x55; + env->dr[7] &= ~DR7_LOCAL_BP_MASK; } #endif } |