- Timestamp:
- Sep 10, 2024 9:19:30 AM (3 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r105997 r105998 2096 2096 pReNative->Core.u64ArgVars = UINT64_MAX; 2097 2097 2098 AssertCompile(RT_ELEMENTS(pReNative->aidxUniqueLabels) == 23); 2098 2099 pReNative->aidxUniqueLabels[0] = UINT32_MAX; 2099 2100 pReNative->aidxUniqueLabels[1] = UINT32_MAX; … … 2119 2120 pReNative->aidxUniqueLabels[21] = UINT32_MAX; 2120 2121 pReNative->aidxUniqueLabels[22] = UINT32_MAX; 2121 #ifdef IEMNATIVE_WITH_RECOMPILER_PER_CHUNK_TAIL_CODE2122 pReNative->aidxUniqueLabels[23] = UINT32_MAX;2123 AssertCompile(RT_ELEMENTS(pReNative->aidxUniqueLabels) == 24);2124 #else2125 AssertCompile(RT_ELEMENTS(pReNative->aidxUniqueLabels) == 23);2126 #endif2127 2122 2128 2123 pReNative->idxLastCheckIrqCallNo = UINT32_MAX; … … 8953 8948 STR_CASE_CMN(NeedCsLimChecking); 8954 8949 STR_CASE_CMN(CheckBranchMiss); 8950 #ifdef IEMNATIVE_WITH_RECOMPILER_PER_CHUNK_TAIL_CODE 8951 STR_CASE_CMN(ReturnSuccess); 8952 #else 8955 8953 STR_CASE_CMN(Return); 8956 #ifdef IEMNATIVE_WITH_RECOMPILER_PER_CHUNK_TAIL_CODE8957 STR_CASE_CMN(ReturnZero);8958 8954 #endif 8959 8955 STR_CASE_CMN(ReturnBreak); … … 9792 9788 * Emit the epilog code. 9793 9789 */ 9794 aoffLabels[kIemNativeLabelType_Return Zero] = off;9790 aoffLabels[kIemNativeLabelType_ReturnSuccess] = off; 9795 9791 off = iemNativeEmitGprZero(pReNative, off, IEMNATIVE_CALL_RET_GREG); 9796 9797 aoffLabels[kIemNativeLabelType_Return] = off; 9792 uint32_t const offReturnWithStatus = off; 9798 9793 off = iemNativeEmitCoreEpilog(pReNative, off); 9799 9794 … … 9883 9878 off = iemNativeEmitCallImm(pReNative, off, (uintptr_t)s_aSimpleTailLabels[i].pfnCallback); 9884 9879 9885 /* jump back to the return sequence / generate a return sequence. */ 9886 if (!s_aSimpleTailLabels[i].fWithEpilog) 9887 off = iemNativeEmitJmpToFixed(pReNative, off, aoffLabels[kIemNativeLabelType_Return]); 9880 /* If the callback is supposed to return with a status code we inline the epilog 9881 sequence for better speed. Otherwise, if the callback shouldn't return because 9882 it throws/longjmps, we just jump to the return sequence to be on the safe side. */ 9883 if (s_aSimpleTailLabels[i].fWithEpilog) 9884 off = iemNativeEmitCoreEpilog(pReNative, off); 9888 9885 else 9889 off = iemNativeEmitCoreEpilog(pReNative, off); 9886 { 9887 # ifdef VBOX_STRICT 9888 off = iemNativeEmitBrk(pReNative, off, 0x2201); 9889 # endif 9890 off = iemNativeEmitJmpToFixed(pReNative, off, offReturnWithStatus); 9891 } 9890 9892 } 9891 9893 … … 9894 9896 /* Make sure we've generate code for all labels. */ 9895 9897 for (uint32_t i = kIemNativeLabelType_Invalid + 1; i < RT_ELEMENTS(aoffLabels); i++) 9896 Assert(aoffLabels[i] != 0 || i == kIemNativeLabelType_Return Zero);9898 Assert(aoffLabels[i] != 0 || i == kIemNativeLabelType_ReturnSuccess); 9897 9899 # endif 9898 9900 } … … 9933 9935 for (uint32_t i = kIemNativeLabelType_Invalid + 1; i < RT_ELEMENTS(pCtx->apExitLabels); i++) 9934 9936 { 9935 Assert(aoffLabels[i] != 0 || i == kIemNativeLabelType_Return Zero);9937 Assert(aoffLabels[i] != 0 || i == kIemNativeLabelType_ReturnSuccess); 9936 9938 pCtx->apExitLabels[i] = &paFinalCommonCodeRx[aoffLabels[i]]; 9937 9939 Log10((" apExitLabels[%u]=%p %s\n", i, pCtx->apExitLabels[i], iemNativeGetLabelName((IEMNATIVELABELTYPE)i, true))); … … 10207 10209 */ 10208 10210 //off = iemNativeEmitBrk(pReNative, off, 0x1227); 10209 off = iemNativeEmitTbExit(pReNative, off, kIemNativeLabelType_Return Zero);10211 off = iemNativeEmitTbExit(pReNative, off, kIemNativeLabelType_ReturnSuccess); 10210 10212 #endif 10211 10213 … … 10298 10300 */ 10299 10301 # ifndef RT_ARCH_AMD64 10300 Assert(!(pReNative->bmLabelTypes & (RT_BIT_64(kIemNativeLabelType_Return) | RT_BIT_64(kIemNativeLabelType_Invalid)))); 10302 Assert(!(pReNative->bmLabelTypes & ( RT_BIT_64(kIemNativeLabelType_ReturnSuccess) 10303 | RT_BIT_64(kIemNativeLabelType_Invalid) ))); 10301 10304 AssertCompile(kIemNativeLabelType_Invalid == 0); 10302 10305 uint64_t fTailLabels = pReNative->bmLabelTypes & (RT_BIT_64(kIemNativeLabelType_LastTbExit + 1U) - 2U); -
trunk/src/VBox/VMM/include/IEMN8veRecompiler.h
r105997 r105998 502 502 kIemNativeLabelType_NonZeroRetOrPassUp, 503 503 #ifdef IEMNATIVE_WITH_RECOMPILER_PER_CHUNK_TAIL_CODE 504 kIemNativeLabelType_Return Zero,/**< Sets eax/w0 to zero and returns. */505 #e ndif504 kIemNativeLabelType_ReturnSuccess, /**< Sets eax/w0 to zero and returns. */ 505 #else 506 506 kIemNativeLabelType_Return, 507 #endif 507 508 /** The last fixup for branches that can span almost the whole TB length. 508 509 * @note Whether kIemNativeLabelType_Return needs to be one of these is 509 510 * a bit questionable, since nobody jumps to it except other tail code. */ 511 #ifdef IEMNATIVE_WITH_RECOMPILER_PER_CHUNK_TAIL_CODE 512 kIemNativeLabelType_LastWholeTbBranch = kIemNativeLabelType_ReturnSuccess, 513 #else 510 514 kIemNativeLabelType_LastWholeTbBranch = kIemNativeLabelType_Return, 515 #endif 511 516 /** The last fixup for branches that exits the TB. */ 517 #ifdef IEMNATIVE_WITH_RECOMPILER_PER_CHUNK_TAIL_CODE 518 kIemNativeLabelType_LastTbExit = kIemNativeLabelType_ReturnSuccess, 519 #else 512 520 kIemNativeLabelType_LastTbExit = kIemNativeLabelType_Return, 521 #endif 513 522 514 523 /** Loop-jump target. */
Note:
See TracChangeset
for help on using the changeset viewer.