Changeset 104468 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- May 1, 2024 12:43:28 AM (7 months ago)
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInternal.h
r104439 r104468 1329 1329 #define IEMTB_GET_TB_LOOKUP_TAB_ENTRY(a_pTb, a_idx) \ 1330 1330 ((PIEMTB *)&(a_pTb)->pabOpcodes[-(int)((a_pTb)->cTbLookupEntries - (a_idx)) * sizeof(PIEMTB)]) 1331 1332 /** 1333 * Gets the physical address for a TB opcode range. 1334 */ 1335 DECL_FORCE_INLINE(RTGCPHYS) iemTbGetRangePhysPageAddr(PCIEMTB pTb, uint8_t idxRange) 1336 { 1337 Assert(idxRange < RT_MIN(pTb->cRanges, RT_ELEMENTS(pTb->aRanges))); 1338 uint8_t const idxPage = pTb->aRanges[idxRange].idxPhysPage; 1339 Assert(idxPage <= RT_ELEMENTS(pTb->aGCPhysPages)); 1340 if (idxPage == 0) 1341 return pTb->GCPhysPc & ~(RTGCPHYS)GUEST_PAGE_OFFSET_MASK; 1342 Assert(!(pTb->aGCPhysPages[idxPage - 1] & GUEST_PAGE_OFFSET_MASK)); 1343 return pTb->aGCPhysPages[idxPage - 1]; 1344 } 1331 1345 1332 1346 … … 2050 2064 //#endif 2051 2065 2052 /** Native recompiler: The TB finished executing completely without jumping to a an exit label. */ 2066 /** Native recompiler: The TB finished executing completely without jumping to a an exit label. 2067 * Not availabe in release builds. */ 2053 2068 STAMCOUNTER StatNativeTbFinished; 2054 2069 /** Native recompiler: The TB finished executing jumping to the ReturnBreak label. */ … … 2062 2077 /** Native recompiler: The TB finished executing via throw / long jump. */ 2063 2078 STAMCOUNTER StatNativeTbExitLongJump; 2079 /** Native recompiler: The TB finished executing jumping to the ReturnBreak 2080 * label, but directly jumped to the next TB, scenario \#1 w/o IRQ checks. */ 2081 STAMCOUNTER StatNativeTbExitDirectLinking1NoIrq; 2082 /** Native recompiler: The TB finished executing jumping to the ReturnBreak 2083 * label, but directly jumped to the next TB, scenario \#1 with IRQ checks. */ 2084 STAMCOUNTER StatNativeTbExitDirectLinking1Irq; 2085 /** Native recompiler: The TB finished executing jumping to the ReturnBreak 2086 * label, but directly jumped to the next TB, scenario \#1 w/o IRQ checks. */ 2087 STAMCOUNTER StatNativeTbExitDirectLinking2NoIrq; 2088 /** Native recompiler: The TB finished executing jumping to the ReturnBreak 2089 * label, but directly jumped to the next TB, scenario \#2 with IRQ checks. */ 2090 STAMCOUNTER StatNativeTbExitDirectLinking2Irq; 2064 2091 2065 2092 /** Native recompiler: The TB finished executing jumping to the RaiseDe label. */ … … 2084 2111 STAMCOUNTER StatNativeTbExitObsoleteTb; 2085 2112 2086 uint64_t au64Padding[1]; 2113 /** Native recompiler: Failure situations with direct linking scenario \#1. 2114 * Counter with StatNativeTbExitReturnBreak. Not in release builds. 2115 * @{ */ 2116 STAMCOUNTER StatNativeTbExitDirectLinking1NoTb; 2117 STAMCOUNTER StatNativeTbExitDirectLinking1MismatchGCPhysPc; 2118 STAMCOUNTER StatNativeTbExitDirectLinking1MismatchFlags; 2119 STAMCOUNTER StatNativeTbExitDirectLinking1PendingIrq; 2120 /** @} */ 2121 2122 /** Native recompiler: Failure situations with direct linking scenario \#2. 2123 * Counter with StatNativeTbExitReturnBreak. Not in release builds. 2124 * @{ */ 2125 STAMCOUNTER StatNativeTbExitDirectLinking2NoTb; 2126 STAMCOUNTER StatNativeTbExitDirectLinking2MismatchGCPhysPc; 2127 STAMCOUNTER StatNativeTbExitDirectLinking2MismatchFlags; 2128 STAMCOUNTER StatNativeTbExitDirectLinking2PendingIrq; 2129 /** @} */ 2130 2131 uint64_t au64Padding[5]; 2087 2132 /** @} */ 2088 2133 -
trunk/src/VBox/VMM/include/IEMN8veRecompiler.h
r104407 r104468 473 473 kIemNativeLabelType_ReturnBreak, 474 474 kIemNativeLabelType_ReturnBreakFF, 475 kIemNativeLabelType_ReturnBreakViaLookup, 476 kIemNativeLabelType_ReturnBreakViaLookupWithIrq, 477 kIemNativeLabelType_ReturnBreakViaLookupWithTlb, 478 kIemNativeLabelType_ReturnBreakViaLookupWithTlbAndIrq, 475 479 kIemNativeLabelType_ReturnWithFlags, 476 480 kIemNativeLabelType_NonZeroRetOrPassUp, … … 1414 1418 uint32_t fSimdRaiseXcptChecksEmitted; 1415 1419 #endif 1420 /** The call number of the last CheckIrq, UINT32_MAX if not seen. */ 1421 uint32_t idxLastCheckIrqCallNo; 1416 1422 1417 1423 /** Core state requiring care with branches. */ -
trunk/src/VBox/VMM/include/IEMN8veRecompilerEmit.h
r104415 r104468 7634 7634 7635 7635 7636 7637 /********************************************************************************************************************************* 7638 * Indirect Jumps. * 7639 *********************************************************************************************************************************/ 7640 7641 /** 7642 * Emits an indirect jump a 64-bit address in a GPR. 7643 */ 7644 DECL_INLINE_THROW(uint32_t) iemNativeEmitJmpViaGpr(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iGprSrc) 7645 { 7646 #ifdef RT_ARCH_AMD64 7647 uint8_t * const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 3); 7648 if (iGprSrc >= 8) 7649 pCodeBuf[off++] = X86_OP_REX_B; 7650 pCodeBuf[off++] = 0xff; 7651 pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 4, iGprSrc & 7); 7652 7653 #elif defined(RT_ARCH_ARM64) 7654 uint32_t * const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1); 7655 pCodeBuf[off++] = Armv8A64MkInstrBr(iGprSrc); 7656 7657 #else 7658 # error "port me" 7659 #endif 7660 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 7661 return off; 7662 } 7663 7664 7636 7665 /********************************************************************************************************************************* 7637 7666 * Calls. *
Note:
See TracChangeset
for help on using the changeset viewer.