Changeset 101849 in vbox for trunk/src/VBox
- Timestamp:
- Nov 6, 2023 9:48:15 AM (13 months ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8vePython.py
r101844 r101849 70 70 71 71 'IEM_MC_CALL_CIMPL_1_THREADED': (None, True, True, ), 72 'IEM_MC_CALL_CIMPL_2_THREADED': (None, True, False,),72 'IEM_MC_CALL_CIMPL_2_THREADED': (None, True, True, ), 73 73 'IEM_MC_CALL_CIMPL_3_THREADED': (None, True, False, ), 74 74 'IEM_MC_CALL_CIMPL_4_THREADED': (None, True, False, ), -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r101844 r101849 2385 2385 while (fGstRegShadows) 2386 2386 { 2387 unsigned const idxGstReg = ASMBitFirstSetU64(fGstRegShadows) ;2387 unsigned const idxGstReg = ASMBitFirstSetU64(fGstRegShadows) - 1; 2388 2388 fGstRegShadows &= ~RT_BIT_64(idxGstReg); 2389 2389 … … 4867 4867 uint8_t const a_Name = iemNativeArgAlloc(pReNative, (a_iArg), sizeof(a_Type)) 4868 4868 4869 #define IEM_MC_ARG_CONST(a_Type, a_Name, a_ iArg) \4869 #define IEM_MC_ARG_CONST(a_Type, a_Name, a_Value, a_iArg) \ 4870 4870 uint8_t const a_Name = iemNativeArgAllocConst(pReNative, (a_iArg), sizeof(a_Type), (a_Value)) 4871 4871 … … 4903 4903 { 4904 4904 Assert(cbType > 0 && cbType <= 64); 4905 unsigned const idxVar = ASMBitFirstSetU32(~pReNative->Core.bmVars) ;4905 unsigned const idxVar = ASMBitFirstSetU32(~pReNative->Core.bmVars) - 1; 4906 4906 AssertStmt(idxVar < RT_ELEMENTS(pReNative->Core.aVars), IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_VAR_EXHAUSTED)); 4907 4907 pReNative->Core.bmVars |= RT_BIT_32(idxVar); … … 4960 4960 if (pReNative->Core.aVars[idxVar].cbVar <= sizeof(uint64_t)) 4961 4961 { 4962 unsigned const iSlot = ASMBitFirstSetU32(~pReNative->Core.bmStack) ;4962 unsigned const iSlot = ASMBitFirstSetU32(~pReNative->Core.bmStack) - 1; 4963 4963 AssertStmt(iSlot < IEMNATIVE_FRAME_VAR_SLOTS, IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_VAR_OUT_OF_STACK_SLOTS)); 4964 4964 pReNative->Core.bmStack |= RT_BIT_32(iSlot); … … 5333 5333 { 5334 5334 uint8_t const idxVar = pReNative->Core.aidxArgVars[i]; 5335 if (pReNative->Core.aVars[idxVar]. uArgNo< RT_ELEMENTS(pReNative->Core.aHstRegs))5335 if (pReNative->Core.aVars[idxVar].idxReg < RT_ELEMENTS(pReNative->Core.aHstRegs)) 5336 5336 { 5337 5337 Assert(pReNative->Core.aVars[idxVar].enmKind == kIemNativeVarKind_Stack); 5338 5338 off = iemNativeEmitLoadGprFromGpr(pReNative, off, idxArgReg, pReNative->Core.aVars[idxVar].idxReg); 5339 pReNative->Core.bmHstRegs = (pReNative->Core.bmHstRegs & ~RT_BIT_32(pReNative->Core.aVars[idxVar].idxReg)) 5340 | RT_BIT_32(idxArgReg); 5341 pReNative->Core.aVars[idxVar].idxReg = idxArgReg; 5339 5342 } 5340 5343 else … … 5402 5405 uint8_t const idxVar = pReNative->Core.aidxArgVars[i]; 5403 5406 int32_t const offBpDisp = g_aoffIemNativeCallStackArgBpDisp[i - IEMNATIVE_CALL_ARG_GREG_COUNT]; 5404 if (pReNative->Core.aVars[idxVar]. uArgNo< RT_ELEMENTS(pReNative->Core.aHstRegs))5407 if (pReNative->Core.aVars[idxVar].idxReg < RT_ELEMENTS(pReNative->Core.aHstRegs)) 5405 5408 { 5406 5409 Assert(pReNative->Core.aVars[idxVar].enmKind == kIemNativeVarKind_Stack); /* Imm as well? */ 5407 off = iemNativeEmitStoreGprByBp(pReNative, off, offBpDisp, pReNative->Core.aVars[idxVar].uArgNo); 5410 off = iemNativeEmitStoreGprByBp(pReNative, off, offBpDisp, pReNative->Core.aVars[idxVar].idxReg); 5411 pReNative->Core.bmHstRegs &= ~RT_BIT_32(pReNative->Core.aVars[idxVar].idxReg); 5412 pReNative->Core.aVars[idxVar].idxReg = UINT8_MAX; 5408 5413 } 5409 5414 else … … 5471 5476 pReNative->Core.aidxArgVars[i] = UINT8_MAX; 5472 5477 pReNative->Core.bmVars &= ~RT_BIT_32(idxVar); 5473 Assert( pReNative->Core.aVars[idxVar].idxReg5474 == (i < RT_ELEMENTS(g_aidxIemNativeCallRegs) ? g_aidxIemNativeCallRegs[i] : UINT8_MAX));5475 5478 } 5476 5479 Assert(pReNative->Core.u64ArgVars == UINT64_MAX); … … 5491 5494 5492 5495 { 5493 //pReNative->pInstrBuf[off++] = 0xcc;5494 5496 /* 5495 5497 * Do all the call setup and cleanup. … … 5564 5566 uintptr_t pfnCImpl, uint8_t idxArg0, uint8_t idxArg1, uint8_t idxArg2) 5565 5567 { 5568 pReNative->pInstrBuf[off++] = 0xcc; 5566 5569 Assert(idxArg0 < RT_ELEMENTS(pReNative->Core.aVars) && (pReNative->Core.bmVars & RT_BIT_32(idxArg0))); 5567 5570 Assert(pReNative->Core.aVars[idxArg0].uArgNo == 0 + IEM_CIMPL_HIDDEN_ARGS); … … 5588 5591 uintptr_t pfnCImpl, uint8_t idxArg0, uint8_t idxArg1, uint8_t idxArg2, uint8_t idxArg3) 5589 5592 { 5593 pReNative->pInstrBuf[off++] = 0xcc; 5590 5594 Assert(idxArg0 < RT_ELEMENTS(pReNative->Core.aVars) && (pReNative->Core.bmVars & RT_BIT_32(idxArg0))); 5591 5595 Assert(pReNative->Core.aVars[idxArg0].uArgNo == 0 + IEM_CIMPL_HIDDEN_ARGS); … … 5616 5620 uintptr_t pfnCImpl, uint8_t idxArg0, uint8_t idxArg1, uint8_t idxArg2, uint8_t idxArg3, uint8_t idxArg4) 5617 5621 { 5622 pReNative->pInstrBuf[off++] = 0xcc; 5618 5623 Assert(idxArg0 < RT_ELEMENTS(pReNative->Core.aVars) && (pReNative->Core.bmVars & RT_BIT_32(idxArg0))); 5619 5624 Assert(pReNative->Core.aVars[idxArg0].uArgNo == 0 + IEM_CIMPL_HIDDEN_ARGS);
Note:
See TracChangeset
for help on using the changeset viewer.