VirtualBox

Changeset 1461 in vbox


Ignore:
Timestamp:
Mar 14, 2007 9:39:09 AM (18 years ago)
Author:
vboxsync
Message:

Don't forget segment override prefix bytes in patch jumps and calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PATM/PATMPatch.cpp

    r742 r1461  
    691691         */
    692692        offset = 0;
     693        /* include prefix byte to make sure we don't use the incorrect selector register. */
     694        if (pCpu->prefix & PREFIX_SEG)
     695            pPB[offset++] = pCpu->prefix_seg;
    693696        pPB[offset++] = 0xFF;              // push r/m32
    694697        pPB[offset++] = MAKE_MODRM(MODRM_MOD(pCpu->ModRM), 6 /* group 5 */, MODRM_RM(pCpu->ModRM));
     
    784787     */
    785788    offset = 0;
     789    /* include prefix byte to make sure we don't use the incorrect selector register. */
     790    if (pCpu->prefix & PREFIX_SEG)
     791        pPB[offset++] = pCpu->prefix_seg;
     792
    786793    pPB[offset++] = 0xFF;              // push r/m32
    787794    pPB[offset++] = MAKE_MODRM(MODRM_MOD(pCpu->ModRM), 6 /* group 5 */, MODRM_RM(pCpu->ModRM));
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