ia64/xen-unstable

changeset 16990:bf4a24c172d2

x86_emulate: fix side-effect macro call.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 05 15:50:59 2008 +0000 (2008-02-05)
parents 92734271810a
children f8db1c6baad9
files xen/arch/x86/x86_emulate.c
line diff
     1.1 --- a/xen/arch/x86/x86_emulate.c	Tue Feb 05 15:45:10 2008 +0000
     1.2 +++ b/xen/arch/x86/x86_emulate.c	Tue Feb 05 15:50:59 2008 +0000
     1.3 @@ -550,7 +550,8 @@ do {                                    
     1.4  
     1.5  #define jmp_rel(rel)                                                    \
     1.6  do {                                                                    \
     1.7 -    _regs.eip += (int)(rel);                                            \
     1.8 +    int _rel = (int)(rel);                                              \
     1.9 +    _regs.eip += _rel;                                                  \
    1.10      if ( !mode_64bit() )                                                \
    1.11          _regs.eip = ((op_bytes == 2)                                    \
    1.12                       ? (uint16_t)_regs.eip : (uint32_t)_regs.eip);      \
    1.13 @@ -2785,9 +2786,11 @@ x86_emulate(
    1.14          break;
    1.15      }
    1.16  
    1.17 -    case 0xeb: /* jmp (short) */
    1.18 -        jmp_rel(insn_fetch_type(int8_t));
    1.19 +    case 0xeb: /* jmp (short) */ {
    1.20 +        int rel = insn_fetch_type(int8_t);
    1.21 +        jmp_rel(rel);
    1.22          break;
    1.23 +    }
    1.24  
    1.25      case 0xf1: /* int1 (icebp) */
    1.26          src.val = EXC_DB;