VirtualBox

Changeset 2047 in vbox for trunk/src/VBox/VMM/PATM


Ignore:
Timestamp:
Apr 12, 2007 1:41:53 PM (18 years ago)
Author:
vboxsync
Message:

Size override fixes

Location:
trunk/src/VBox/VMM/PATM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PATM/PATMA.asm

    r2046 r2047  
    25342534
    25352535
    2536 ; push ss, check and correct RPL
     2536; check and correct RPL of pushed ss
    25372537BEGINPROC PATMMovFromSS
    25382538PATMMovFromSS_Start:
    2539     push    ss
    25402539    push    eax
    25412540    pushfd
     
    25492548    popfd
    25502549    pop     eax
    2551     add     esp, 2          ; ss popped off as 16 bits value
    25522550PATMMovFromSS_Start_End:
    25532551ENDPROC PATMMovFromSS
  • trunk/src/VBox/VMM/PATM/PATMPatch.cpp

    r2046 r2047  
    12861286
    12871287    Log(("patmPatchGenMovFromSS %VGv\n", pCurInstrGC));
     1288   
     1289    Assert(pPatch->flags & PATMFL_CODE32);
    12881290
    12891291    PATCHGEN_PROLOG(pVM, pPatch);
     
    12911293    PATCHGEN_EPILOG(pPatch, size);
    12921294
    1293     /* pushes ss, checks and corrects RPL */
     1295    /* push ss */
     1296    PATCHGEN_PROLOG_NODEF(pVM, pPatch);
     1297    offset = 0;
     1298    if (pCpu->prefix & PREFIX_OPSIZE)
     1299        pPB[offset++] = 0x66;       /* size override -> 16 bits push */
     1300    pPB[offset++] = 0x16;
     1301    PATCHGEN_EPILOG(pPatch, offset);
     1302
     1303    /* checks and corrects RPL of pushed ss*/
    12941304    PATCHGEN_PROLOG_NODEF(pVM, pPatch);
    12951305    size = patmPatchGenCode(pVM, pPatch, pPB, &PATMMovFromSSRecord, 0, false);
     
    12991309    PATCHGEN_PROLOG_NODEF(pVM, pPatch);
    13001310    offset = 0;
    1301     if (pPatch->flags & PATMFL_CODE32)
     1311    if (pCpu->prefix & PREFIX_OPSIZE)
    13021312        pPB[offset++] = 0x66; /* size override -> 16 bits pop */
    13031313    pPB[offset++] = 0x58 + pCpu->param1.base.reg_gen32;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette