VirtualBox

Changeset 65982 in vbox


Ignore:
Timestamp:
Mar 7, 2017 1:29:51 PM (8 years ago)
Author:
vboxsync
Message:

PGMInline.h: a couple of more 32-bit shift optimizations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/PGMInline.h

    r64322 r65982  
    10081008DECLINLINE(X86PDE) pgmShwGet32BitPDE(PVMCPU pVCpu, RTGCPTR GCPtr)
    10091009{
    1010     const unsigned iPd = (GCPtr >> X86_PD_SHIFT) & X86_PD_MASK;
    1011 
    10121010    PX86PD pShwPde = pgmShwGet32BitPDPtr(pVCpu);
    10131011    if (!pShwPde)
     
    10161014        return ZeroPde;
    10171015    }
    1018     return pShwPde->a[iPd];
     1016    return pShwPde->a[(uint32_t)GCPtr >> X86_PD_SHIFT];
    10191017}
    10201018
     
    10301028DECLINLINE(PX86PDE) pgmShwGet32BitPDEPtr(PVMCPU pVCpu, RTGCPTR GCPtr)
    10311029{
    1032     const unsigned iPd = (GCPtr >> X86_PD_SHIFT) & X86_PD_MASK;
    1033 
    10341030    PX86PD pPde = pgmShwGet32BitPDPtr(pVCpu);
    10351031    AssertReturn(pPde, NULL);
    1036     return &pPde->a[iPd];
     1032    return &pPde->a[(uint32_t)GCPtr >> X86_PD_SHIFT];
    10371033}
    10381034
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