37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
# HG changeset patch
|
|
# User Keir Fraser <keir.fraser@citrix.com>
|
|
# Date 1202226659 0
|
|
# Node ID bf4a24c172d23ae9839ee564225d49ed95167de3
|
|
# Parent 92734271810aaa32d27fce777684649995fb1665
|
|
x86_emulate: fix side-effect macro call.
|
|
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
===================================================================
|
|
--- xen-3.2-testing.orig/xen/arch/x86/x86_emulate.c
|
|
+++ xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
@@ -546,7 +546,8 @@ do {
|
|
|
|
#define jmp_rel(rel) \
|
|
do { \
|
|
- _regs.eip += (int)(rel); \
|
|
+ int _rel = (int)(rel); \
|
|
+ _regs.eip += _rel; \
|
|
if ( !mode_64bit() ) \
|
|
_regs.eip = ((op_bytes == 2) \
|
|
? (uint16_t)_regs.eip : (uint32_t)_regs.eip); \
|
|
@@ -2543,9 +2544,11 @@ x86_emulate(
|
|
break;
|
|
}
|
|
|
|
- case 0xeb: /* jmp (short) */
|
|
- jmp_rel(insn_fetch_type(int8_t));
|
|
+ case 0xeb: /* jmp (short) */ {
|
|
+ int rel = insn_fetch_type(int8_t);
|
|
+ jmp_rel(rel);
|
|
break;
|
|
+ }
|
|
|
|
case 0xf1: /* int1 (icebp) */
|
|
src.val = EXC_DB;
|