aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-01-09 10:11:31 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-01-09 10:11:31 +0000
commita24e208fb704a22322ad5869dfc9eb09a7c2cc83 (patch)
tree864fead05f6c66e30948ea62e389acd5ae41adb7
parent98f4e2606f230327d128e88c3797a0744b512248 (diff)
downloadxen-a24e208fb704a22322ad5869dfc9eb09a7c2cc83.tar.gz
xen-a24e208fb704a22322ad5869dfc9eb09a7c2cc83.tar.bz2
xen-a24e208fb704a22322ad5869dfc9eb09a7c2cc83.zip
x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
immediate byte third operand. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
-rw-r--r--xen/arch/x86/x86_emulate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/arch/x86/x86_emulate.c b/xen/arch/x86/x86_emulate.c
index f894047068..07bc21f4ed 100644
--- a/xen/arch/x86/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate.c
@@ -1064,6 +1064,9 @@ x86_emulate(
/* Special case in Grp3: test has immediate operand. */
ea.mem.off += (d & ByteOp) ? 1
: ((op_bytes == 8) ? 4 : op_bytes);
+ else if ( (b == 0xf7) == 0xa4 )
+ /* SHLD/SHRD with immediate byte third operand. */
+ ea.mem.off++;
break;
case 1:
ea.mem.off += insn_fetch_type(int8_t);