VirtualBox

Ignore:
Timestamp:
Feb 5, 2010 4:04:36 AM (15 years ago)
Author:
vboxsync
Message:

VMM: warnings. Changed PATMIsPatchGCAddr and CSAMIsKnownDangerousInstr to take RTRCUINTPTR instead of RTRCPTR so we can mostly avoid having to cast the parameter.

File:
1 edited

Legend:

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

    r19259 r26271  
    5353VMMDECL(void) PATMRawEnter(PVM pVM, PCPUMCTXCORE pCtxCore)
    5454{
    55     bool fPatchCode = PATMIsPatchGCAddr(pVM, (RTRCPTR)pCtxCore->eip);
     55    bool fPatchCode = PATMIsPatchGCAddr(pVM, pCtxCore->eip);
    5656
    5757    /*
     
    124124VMMDECL(void) PATMRawLeave(PVM pVM, PCPUMCTXCORE pCtxCore, int rawRC)
    125125{
    126     bool fPatchCode = PATMIsPatchGCAddr(pVM, (RTRCPTR)pCtxCore->eip);
     126    bool fPatchCode = PATMIsPatchGCAddr(pVM, pCtxCore->eip);
    127127    /*
    128128     * We will only be called if PATMRawEnter was previously called.
     
    268268 * @param   pAddrGC     Guest context address
    269269 */
    270 VMMDECL(bool) PATMIsPatchGCAddr(PVM pVM, RTRCPTR pAddrGC)
    271 {
    272     return (PATMIsEnabled(pVM) && pAddrGC >= pVM->patm.s.pPatchMemGC && pAddrGC < (RTRCPTR)((RTRCUINTPTR)pVM->patm.s.pPatchMemGC + pVM->patm.s.cbPatchMem)) ? true : false;
     270VMMDECL(bool) PATMIsPatchGCAddr(PVM pVM, RTRCUINTPTR pAddrGC)
     271{
     272    return (PATMIsEnabled(pVM) && pAddrGC - (RTRCUINTPTR)pVM->patm.s.pPatchMemGC < pVM->patm.s.cbPatchMem) ? true : false;
    273273}
    274274
     
    317317    if (PATMIsEnabled(pVM))
    318318    {
    319         if (PATMIsPatchGCAddr(pVM, (RTRCPTR)pCtxCore->eip))
     319        if (PATMIsPatchGCAddr(pVM, pCtxCore->eip))
    320320            return false;
    321321    }
     
    462462    Log(("PATMAddBranchToLookupCache: Adding (%RRv->%RRv (%RRv)) to table %RRv\n", pBranchTarget, pRelBranchPatch + pVM->patm.s.pPatchMemGC, pRelBranchPatch, pJumpTableGC));
    463463
    464     AssertReturn(PATMIsPatchGCAddr(pVM, pJumpTableGC), VERR_INVALID_PARAMETER);
     464    AssertReturn(PATMIsPatchGCAddr(pVM, (RTRCUINTPTR)pJumpTableGC), VERR_INVALID_PARAMETER);
    465465
    466466#ifdef IN_RC
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