[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Fix push/jmp/call <reg/mem> to check whether the operand is register
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1174990855 -3600 # Node ID b685bb321d1e7c70a9d1a23879b7a0425d6d7532 # Parent 70f4d99d1aed928a5db5344c589d8ae854f050dc Fix push/jmp/call <reg/mem> to check whether the operand is register or memory when expanding the operand to 8 bytes on x86/64. Based on original patch by Dexuan Cui <dexuan.cui@xxxxxxxxx> Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- xen/arch/x86/x86_emulate.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff -r 70f4d99d1aed -r b685bb321d1e xen/arch/x86/x86_emulate.c --- a/xen/arch/x86/x86_emulate.c Mon Mar 26 17:22:45 2007 +0100 +++ b/xen/arch/x86/x86_emulate.c Tue Mar 27 11:20:55 2007 +0100 @@ -1565,8 +1565,10 @@ x86_emulate( if ( ((op_bytes = dst.bytes) != 8) && mode_64bit() ) { dst.bytes = op_bytes = 8; - if ( (rc = ops->read(dst.mem.seg, dst.mem.off, - &dst.val, 8, ctxt)) != 0 ) + if ( dst.type == OP_REG ) + dst.val = *dst.reg; + else if ( (rc = ops->read(dst.mem.seg, dst.mem.off, + &dst.val, 8, ctxt)) != 0 ) goto done; } src.val = _regs.eip; @@ -1579,8 +1581,10 @@ x86_emulate( if ( mode_64bit() && (dst.bytes == 4) ) { dst.bytes = 8; - if ( (rc = ops->read(dst.mem.seg, dst.mem.off, - &dst.val, 8, ctxt)) != 0 ) + if ( dst.type == OP_REG ) + dst.val = *dst.reg; + else if ( (rc = ops->read(dst.mem.seg, dst.mem.off, + &dst.val, 8, ctxt)) != 0 ) goto done; } if ( (rc = ops->write(x86_seg_ss, sp_pre_dec(dst.bytes), _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |