VirtualBox

Changeset 8849

Show
Ignore:
Timestamp:
05/15/08 15:16:14 (2 months ago)
Author:
vboxsync
Message:

load the modrm value before parsing it (CMPXCHG8B/16B). Updated s->pc comment.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/recompiler/target-i386/translate.c

    r8832 r8849  
    32383238static bool is_invalid_lock_sequence(DisasContext *s, target_ulong pc_start, int b) 
    32393239{ 
    3240 #if 0 /** @todo test this properly! */ 
     3240#if 1 /** @todo test this properly! */ 
    32413241    target_ulong pc = s->pc; 
    32423242    int modrm, mod, op; 
     
    33383338                /* /1: CMPXCHG8B mem64 or CMPXCHG16B mem128 */ 
    33393339                case 0xc7: 
     3340                    modrm = ldub_code(pc++); 
    33403341                    op = (modrm >> 3) & 7; 
    33413342                    if (op != 1) 
     
    33463347    } 
    33473348 
    3348     /* illegal sequence. */ 
     3349    /* illegal sequence. The s->pc is past the lock prefix and that 
     3350       is sufficient for the TB, I think. */ 
    33493351    Log(("illegal lock sequence %VGv (b=%#x)\n", pc_start, b)); 
    3350     /* exception 6 (UD) is a fault, therefore the PC must not be changed */ 
    33513352    return true; 
    33523353#else 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy