qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [FOR 0.12][PATCH] target-i386: Fix evaluation of DR7 register
@ 2009-12-14 11:26 Jan Kiszka
  2009-12-15  2:07 ` TeLeMan
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2009-12-14 11:26 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

hw_breakpoint_type and hw_breakpoint_len used the wrong index multiplier
to extract type and len.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 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;
 }
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-16  0:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-14 11:26 [Qemu-devel] [FOR 0.12][PATCH] target-i386: Fix evaluation of DR7 register Jan Kiszka
2009-12-15  2:07 ` TeLeMan
2009-12-15 23:21   ` [Qemu-devel] " Jan Kiszka
2009-12-16  0:28     ` TeLeMan
2009-12-16  0:41       ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).