Changeset 106408 in vbox for trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
- Timestamp:
- Oct 16, 2024 10:52:26 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r106407 r106408 7494 7494 template<bool const a_fInitialized, bool const a_fWithRegPref> 7495 7495 DECL_FORCE_INLINE_THROW(uint8_t) 7496 iemNativeVarRegisterAcquire Int(PIEMRECOMPILERSTATE pReNative, uint8_t idxVar, uint32_t *poff, uint8_t idxRegPref)7496 iemNativeVarRegisterAcquireSlowInt(PIEMRECOMPILERSTATE pReNative, uint8_t idxVar, uint32_t *poff, uint8_t idxRegPref) 7497 7497 { 7498 7498 IEMNATIVE_ASSERT_VAR_IDX(pReNative, idxVar); … … 7502 7502 Assert(!a_fWithRegPref || idxRegPref < RT_ELEMENTS(pReNative->Core.aHstRegs)); 7503 7503 7504 /** @todo inline this bit? */ 7505 uint8_t idxReg = pVar->idxReg; 7506 if (idxReg < RT_ELEMENTS(pReNative->Core.aHstRegs)) 7507 { 7508 Assert( pVar->enmKind > kIemNativeVarKind_Invalid 7509 && pVar->enmKind < kIemNativeVarKind_End); 7510 pVar->fRegAcquired = true; 7511 return idxReg; 7512 } 7504 /* This slow code path only handles the case where no register have been 7505 allocated for the variable yet. */ 7506 Assert(pVar->idxReg == UINT8_MAX); 7513 7507 7514 7508 /* … … 7538 7532 * calls causing less optimal code to be generated in the python script. */ 7539 7533 7534 uint8_t idxReg; 7540 7535 uint8_t const uArgNo = pVar->uArgNo; 7541 7536 if ( uArgNo < RT_ELEMENTS(g_aidxIemNativeCallRegs) … … 7634 7629 7635 7630 7636 /** See iemNativeVarRegisterAcquire Int for details. */7637 DECL_HIDDEN_THROW(uint8_t) iemNativeVarRegisterAcquire (PIEMRECOMPILERSTATE pReNative, uint8_t idxVar, uint32_t *poff)7631 /** See iemNativeVarRegisterAcquireSlowInt for details. */ 7632 DECL_HIDDEN_THROW(uint8_t) iemNativeVarRegisterAcquireSlow(PIEMRECOMPILERSTATE pReNative, uint8_t idxVar, uint32_t *poff) 7638 7633 { 7639 7634 /* very likely */ 7640 7635 //STAM_REL_COUNTER_INC(&pReNative->pVCpu->iem.s.aStatAdHoc[(pReNative->Core.aVars[IEMNATIVE_VAR_IDX_UNPACK(idxVar)].idxReg < RT_ELEMENTS(pReNative->Core.aHstRegs)) + 0]); 7641 return iemNativeVarRegisterAcquire Int<false, false>(pReNative, idxVar, poff, UINT8_MAX);7642 } 7643 7644 7645 /** See iemNativeVarRegisterAcquire Int for details. */7646 DECL_HIDDEN_THROW(uint8_t) iemNativeVarRegisterAcquireInited (PIEMRECOMPILERSTATE pReNative, uint8_t idxVar, uint32_t *poff)7636 return iemNativeVarRegisterAcquireSlowInt<false, false>(pReNative, idxVar, poff, UINT8_MAX); 7637 } 7638 7639 7640 /** See iemNativeVarRegisterAcquireSlowInt for details. */ 7641 DECL_HIDDEN_THROW(uint8_t) iemNativeVarRegisterAcquireInitedSlow(PIEMRECOMPILERSTATE pReNative, uint8_t idxVar, uint32_t *poff) 7647 7642 { 7648 7643 /* even more likely */ 7649 7644 //STAM_REL_COUNTER_INC(&pReNative->pVCpu->iem.s.aStatAdHoc[(pReNative->Core.aVars[IEMNATIVE_VAR_IDX_UNPACK(idxVar)].idxReg < RT_ELEMENTS(pReNative->Core.aHstRegs)) + 2]); 7650 return iemNativeVarRegisterAcquire Int<true, false>(pReNative, idxVar, poff, UINT8_MAX);7651 } 7652 7653 7654 /** See iemNativeVarRegisterAcquire Int for details. */7645 return iemNativeVarRegisterAcquireSlowInt<true, false>(pReNative, idxVar, poff, UINT8_MAX); 7646 } 7647 7648 7649 /** See iemNativeVarRegisterAcquireSlowInt for details. */ 7655 7650 DECL_HIDDEN_THROW(uint8_t) 7656 iemNativeVarRegisterAcquireWithPref (PIEMRECOMPILERSTATE pReNative, uint8_t idxVar, uint32_t *poff, uint8_t idxRegPref)7651 iemNativeVarRegisterAcquireWithPrefSlow(PIEMRECOMPILERSTATE pReNative, uint8_t idxVar, uint32_t *poff, uint8_t idxRegPref) 7657 7652 { 7658 7653 /* unused */ 7659 7654 //STAM_REL_COUNTER_INC(&pReNative->pVCpu->iem.s.aStatAdHoc[(pReNative->Core.aVars[IEMNATIVE_VAR_IDX_UNPACK(idxVar)].idxReg < RT_ELEMENTS(pReNative->Core.aHstRegs)) + 4]); 7660 return iemNativeVarRegisterAcquire Int<false, true>(pReNative, idxVar, poff, idxRegPref);7661 } 7662 7663 7664 /** See iemNativeVarRegisterAcquire Int for details. */7655 return iemNativeVarRegisterAcquireSlowInt<false, true>(pReNative, idxVar, poff, idxRegPref); 7656 } 7657 7658 7659 /** See iemNativeVarRegisterAcquireSlowInt for details. */ 7665 7660 DECL_HIDDEN_THROW(uint8_t) 7666 iemNativeVarRegisterAcquireInitedWithPref (PIEMRECOMPILERSTATE pReNative, uint8_t idxVar, uint32_t *poff, uint8_t idxRegPref)7661 iemNativeVarRegisterAcquireInitedWithPrefSlow(PIEMRECOMPILERSTATE pReNative, uint8_t idxVar, uint32_t *poff, uint8_t idxRegPref) 7667 7662 { 7668 7663 /* very very likely */ 7669 7664 //STAM_REL_COUNTER_INC(&pReNative->pVCpu->iem.s.aStatAdHoc[(pReNative->Core.aVars[IEMNATIVE_VAR_IDX_UNPACK(idxVar)].idxReg < RT_ELEMENTS(pReNative->Core.aHstRegs)) + 6]); 7670 return iemNativeVarRegisterAcquire Int<true, true>(pReNative, idxVar, poff, idxRegPref);7665 return iemNativeVarRegisterAcquireSlowInt<true, true>(pReNative, idxVar, poff, idxRegPref); 7671 7666 } 7672 7667
Note:
See TracChangeset
for help on using the changeset viewer.