Changeset 26271 in vbox for trunk/src/VBox/VMM/PATM/VMMAll/PATMAll.cpp
- Timestamp:
- Feb 5, 2010 4:04:36 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PATM/VMMAll/PATMAll.cpp
r19259 r26271 53 53 VMMDECL(void) PATMRawEnter(PVM pVM, PCPUMCTXCORE pCtxCore) 54 54 { 55 bool fPatchCode = PATMIsPatchGCAddr(pVM, (RTRCPTR)pCtxCore->eip);55 bool fPatchCode = PATMIsPatchGCAddr(pVM, pCtxCore->eip); 56 56 57 57 /* … … 124 124 VMMDECL(void) PATMRawLeave(PVM pVM, PCPUMCTXCORE pCtxCore, int rawRC) 125 125 { 126 bool fPatchCode = PATMIsPatchGCAddr(pVM, (RTRCPTR)pCtxCore->eip);126 bool fPatchCode = PATMIsPatchGCAddr(pVM, pCtxCore->eip); 127 127 /* 128 128 * We will only be called if PATMRawEnter was previously called. … … 268 268 * @param pAddrGC Guest context address 269 269 */ 270 VMMDECL(bool) PATMIsPatchGCAddr(PVM pVM, RTRC PTR pAddrGC)271 { 272 return (PATMIsEnabled(pVM) && pAddrGC >= pVM->patm.s.pPatchMemGC && pAddrGC < (RTRCPTR)((RTRCUINTPTR)pVM->patm.s.pPatchMemGC + pVM->patm.s.cbPatchMem)) ? true : false;270 VMMDECL(bool) PATMIsPatchGCAddr(PVM pVM, RTRCUINTPTR pAddrGC) 271 { 272 return (PATMIsEnabled(pVM) && pAddrGC - (RTRCUINTPTR)pVM->patm.s.pPatchMemGC < pVM->patm.s.cbPatchMem) ? true : false; 273 273 } 274 274 … … 317 317 if (PATMIsEnabled(pVM)) 318 318 { 319 if (PATMIsPatchGCAddr(pVM, (RTRCPTR)pCtxCore->eip))319 if (PATMIsPatchGCAddr(pVM, pCtxCore->eip)) 320 320 return false; 321 321 } … … 462 462 Log(("PATMAddBranchToLookupCache: Adding (%RRv->%RRv (%RRv)) to table %RRv\n", pBranchTarget, pRelBranchPatch + pVM->patm.s.pPatchMemGC, pRelBranchPatch, pJumpTableGC)); 463 463 464 AssertReturn(PATMIsPatchGCAddr(pVM, pJumpTableGC), VERR_INVALID_PARAMETER);464 AssertReturn(PATMIsPatchGCAddr(pVM, (RTRCUINTPTR)pJumpTableGC), VERR_INVALID_PARAMETER); 465 465 466 466 #ifdef IN_RC
Note:
See TracChangeset
for help on using the changeset viewer.