VirtualBox

Changeset 1465 in vbox


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

2nd attempt with segment prefix support

File:
1 edited

Legend:

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

    r1462 r1465  
    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++] = DISQuerySegPrefixByte(pCpu);
    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++] = DISQuerySegPrefixByte(pCpu);
     792
    786793    pPB[offset++] = 0xFF;              // push r/m32
    787794    pPB[offset++] = MAKE_MODRM(MODRM_MOD(pCpu->ModRM), 6 /* group 5 */, MODRM_RM(pCpu->ModRM));
     
    13311338        if (pCpu->prefix == PREFIX_SEG)
    13321339        {
    1333             /** @todo untested */
    1334             pPB[offset++] = pCpu->prefix_seg;
     1340            pPB[offset++] = DISQuerySegPrefixByte(pCpu);
    13351341        }
    13361342        pPB[offset++] = 0x8D;              // lea       edx, dword ptr [dest]
     
    14271433    if (pCpu->prefix == PREFIX_SEG)
    14281434    {
    1429         /* @todo untested */
    1430         pPB[offset++] = pCpu->prefix_seg;
     1435        pPB[offset++] = DISQuerySegPrefixByte(pCpu);
    14311436    }
    14321437    pPB[offset++] = 0x8D;              // lea       edx, dword ptr [dest]
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