Changeset 103907 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Mar 19, 2024 7:48:28 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r103895 r103907 7018 7018 pReNative->Core.bmStack |= RT_BIT_32(iSlot); 7019 7019 pVar->idxStackSlot = (uint8_t)iSlot; 7020 Log11(("iemNativeVar SetKindToStack: idxVar=%#x iSlot=%#x\n", idxVar, iSlot));7020 Log11(("iemNativeVarGetStackSlot: idxVar=%#x iSlot=%#x\n", idxVar, iSlot)); 7021 7021 return (uint8_t)iSlot; 7022 7022 } … … 7031 7031 uint32_t const fBitAlignMask = RT_BIT_32(ASMBitLastSetU32(pVar->cbVar) - 4) - 1; 7032 7032 uint32_t fBitAllocMask = RT_BIT_32((pVar->cbVar + 7) >> 3) - 1; 7033 uint32_t bmStack = ~pReNative->Core.bmStack;7034 while (bmStack != 0)7035 { 7036 /** @todo allocate from the top to reduce BP displacement. */ 7037 unsigned const iSlot = ASMBitFirstSetU32(bmStack) - 1;7038 AssertStmt(iSlot < IEMNATIVE_FRAME_VAR_SLOTS, IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_VAR_OUT_OF_STACK_SLOTS));7039 if ( !(iSlot & fBitAlignMask))7033 uint32_t bmStack = pReNative->Core.bmStack; 7034 while (bmStack != UINT32_MAX) 7035 { 7036 unsigned iSlot = ASMBitLastSetU32(~bmStack); 7037 AssertStmt(iSlot, IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_VAR_OUT_OF_STACK_SLOTS)); 7038 iSlot = (iSlot - 1) & ~fBitAlignMask; 7039 if ((bmStack & ~(fBitAllocMask << iSlot)) == bmStack) 7040 7040 { 7041 if ((bmStack & (fBitAllocMask << iSlot)) == (fBitAllocMask << iSlot)) 7042 { 7043 pReNative->Core.bmStack |= (fBitAllocMask << iSlot); 7044 pVar->idxStackSlot = (uint8_t)iSlot; 7045 Log11(("iemNativeVarSetKindToStack: idxVar=%#x iSlot=%#x/%#x (cbVar=%#x)\n", 7046 idxVar, iSlot, fBitAllocMask, pVar->cbVar)); 7047 return (uint8_t)iSlot; 7048 } 7041 pReNative->Core.bmStack |= (fBitAllocMask << iSlot); 7042 pVar->idxStackSlot = (uint8_t)iSlot; 7043 Log11(("iemNativeVarGetStackSlot: idxVar=%#x iSlot=%#x/%#x (cbVar=%#x)\n", 7044 idxVar, iSlot, fBitAllocMask, pVar->cbVar)); 7045 return (uint8_t)iSlot; 7049 7046 } 7050 bmStack &= ~(fBitAlignMask << (iSlot & ~fBitAlignMask)); 7047 7048 bmStack |= (fBitAllocMask << iSlot); 7051 7049 } 7052 7050 AssertFailedStmt(IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_VAR_OUT_OF_STACK_SLOTS)); … … 7845 7843 Assert(pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat == kIemNativeWhat_Var); 7846 7844 7847 uint8_t const idxVar = pReNative->Core.aHst Regs[idxHstReg].idxVar;7845 uint8_t const idxVar = pReNative->Core.aHstSimdRegs[idxHstReg].idxVar; 7848 7846 IEMNATIVE_ASSERT_VAR_IDX(pReNative, idxVar); 7849 7847 AssertStmt( IEMNATIVE_VAR_IDX_UNPACK(idxVar) < RT_ELEMENTS(pReNative->Core.aVars)
Note:
See TracChangeset
for help on using the changeset viewer.