[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [FOR 0.12][PATCH] target-i386: Fix evaluation of DR7 regist
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [FOR 0.12][PATCH] target-i386: Fix evaluation of DR7 register |
Date: |
Mon, 14 Dec 2009 12:26:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
hw_breakpoint_type and hw_breakpoint_len used the wrong index multiplier
to extract type and len.
Signed-off-by: Jan Kiszka <address@hidden>
---
target-i386/cpu.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 9ef1be4..e835f23 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -834,12 +834,12 @@ static inline int hw_breakpoint_enabled(unsigned long
dr7, int index)
static inline int hw_breakpoint_type(unsigned long dr7, int index)
{
- return (dr7 >> (DR7_TYPE_SHIFT + (index * 2))) & 3;
+ return (dr7 >> (DR7_TYPE_SHIFT + (index * 4))) & 3;
}
static inline int hw_breakpoint_len(unsigned long dr7, int index)
{
- int len = ((dr7 >> (DR7_LEN_SHIFT + (index * 2))) & 3);
+ int len = ((dr7 >> (DR7_LEN_SHIFT + (index * 4))) & 3);
return (len == 2) ? 8 : len + 1;
}
- [Qemu-devel] [FOR 0.12][PATCH] target-i386: Fix evaluation of DR7 register,
Jan Kiszka <=