WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.1-testing] x86_emulate: Correct RIP-relative addr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 11 Jan 2008 03:50:24 -0800
Delivery-date: Fri, 11 Jan 2008 03:52:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1199965401 0
# Node ID 337dc1a3f7ca3663d7c057576acb293b08e7a70f
# Parent  e8fca4c42d05d16906dc3f76e712a369292685a8
x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
immediate byte third operand.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   16696:b5b3e27f1af3f709a7795d407b567a7b4db533f0
xen-unstable date:        Wed Jan 09 10:11:31 2008 +0000

x86_emulate: Fix handling of RIP-relative addressing.
The handling of SHLD/SHRD introduced in 16696:b5b3e27f1af3f7 was
incorrect; thanks to Gary Grebus @ Virtual Iron for spotting it.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   16699:7e400607cdd8aa810b96a832eaf8989f48dd6646
xen-unstable date:        Wed Jan 09 22:21:28 2008 +0000
---
 xen/arch/x86/x86_emulate.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r e8fca4c42d05 -r 337dc1a3f7ca xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Thu Jan 10 11:42:36 2008 +0000
+++ b/xen/arch/x86/x86_emulate.c        Thu Jan 10 11:43:21 2008 +0000
@@ -936,11 +936,14 @@ x86_emulate(
                         ((op_bytes == 8) ? 4 : op_bytes);
                 else if ( (d & SrcMask) == SrcImmByte )
                     ea.mem.off += 1;
-                else if ( ((b == 0xf6) || (b == 0xf7)) &&
+                else if ( !twobyte && ((b & 0xfe) == 0xf6) &&
                           ((modrm_reg & 7) <= 1) )
                     /* Special case in Grp3: test has immediate operand. */
                     ea.mem.off += (d & ByteOp) ? 1
                         : ((op_bytes == 8) ? 4 : op_bytes);
+                else if ( twobyte && ((b & 0xf7) == 0xa4) )
+                    /* SHLD/SHRD with immediate byte third operand. */
+                    ea.mem.off++;
                 break;
             case 1:
                 ea.mem.off += insn_fetch_type(int8_t);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with, Xen patchbot-3.1-testing <=