Changeset 105728 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 19, 2024 2:09:39 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMN8veRecompilerTlbLookup.h
r105318 r105728 1057 1057 * IEMCPU members and we return a GCPhys address rather than a host pointer. 1058 1058 */ 1059 # if defined(RT_ARCH_ARM64) 1060 uint8_t const idxRegMappingPtr = a_fDataTlb && idxRegFlatPtr != idxRegMemResult /* See step 1b. */ 1061 ? idxRegMemResult /* saves one instruction */ : pTlbState->idxReg1; 1062 # else 1063 uint8_t const idxRegMappingPtr = pTlbState->idxReg1; /** @todo optimize the AMD64 case as well. */ 1064 # endif 1059 1065 # if defined(RT_ARCH_ARM64) && defined(IEMNATIVE_WITH_TLB_LOOKUP_LOAD_STORE_PAIR) 1060 1066 if (!a_fDataTlb) … … 1063 1069 AssertCompileMemberAlignment(IEMTLBENTRY, GCPhys, 16); 1064 1070 AssertCompileAdjacentMembers(IEMTLBENTRY, GCPhys, pbMappingR3); 1065 pCodeBuf[off++] = Armv8A64MkInstrLdPairGpr(pTlbState->idxReg4, pTlbState->idxReg1,1071 pCodeBuf[off++] = Armv8A64MkInstrLdPairGpr(pTlbState->idxReg4, idxRegMappingPtr, 1066 1072 pTlbState->idxReg2, RT_UOFFSETOF(IEMTLBENTRY, GCPhys) / 8); 1067 1073 } … … 1070 1076 { 1071 1077 /* mov reg1, [reg2->pbMappingR3] */ 1072 off = iemNativeEmitLoadGprByGprU64Ex(pCodeBuf, off, pTlbState->idxReg1, pTlbState->idxReg2,1078 off = iemNativeEmitLoadGprByGprU64Ex(pCodeBuf, off, idxRegMappingPtr, pTlbState->idxReg2, 1073 1079 RT_UOFFSETOF(IEMTLBENTRY, pbMappingR3)); 1074 1080 } 1075 /* if (!reg1) goto tlbmiss; */1076 /** @todo eliminate the need for this test? */1077 off = iemNativeEmitTestIfGprIsZeroAndJmpToLabelEx(pReNative, pCodeBuf, off, pTlbState->idxReg1,1078 true /*f64Bit*/, idxLabelTlbMiss);1079 1081 1080 1082 if (a_fDataTlb) … … 1082 1084 if (idxRegFlatPtr == idxRegMemResult) /* See step 1b. */ 1083 1085 { 1086 Assert(idxRegMappingPtr == pTlbState->idxReg1); 1084 1087 /* and result, 0xfff */ 1085 1088 off = iemNativeEmitAndGpr32ByImmEx(pCodeBuf, off, idxRegMemResult, GUEST_PAGE_OFFSET_MASK); 1089 /* add result, reg1 */ 1090 off = iemNativeEmitAddTwoGprsEx(pCodeBuf, off, idxRegMemResult, idxRegMappingPtr); 1086 1091 } 1087 1092 else 1088 1093 { 1089 1094 Assert(idxRegFlatPtr == pTlbState->idxRegPtr); 1095 # if defined(RT_ARCH_ARM64) 1096 Assert(idxRegMappingPtr == idxRegMemResult); 1097 AssertCompile(GUEST_PAGE_SIZE <= HOST_PAGE_SIZE); 1098 pCodeBuf[off++] = Armv8A64MkInstrBfxil(idxRegMemResult, idxRegFlatPtr, 0, GUEST_PAGE_SHIFT); 1099 # else 1100 Assert(idxRegMappingPtr == pTlbState->idxReg1); 1090 1101 /* result = regflat & 0xfff */ 1091 1102 off = iemNativeEmitGpr32EqGprAndImmEx(pCodeBuf, off, idxRegMemResult, idxRegFlatPtr, GUEST_PAGE_OFFSET_MASK); 1092 }1093 1094 /* add result, reg1 */ 1095 off = iemNativeEmitAddTwoGprsEx(pCodeBuf, off, idxRegMemResult, pTlbState->idxReg1);1103 /* add result, reg1 */ 1104 off = iemNativeEmitAddTwoGprsEx(pCodeBuf, off, idxRegMemResult, pTlbState->idxReg1); 1105 # endif 1106 } 1096 1107 } 1097 1108 else
Note:
See TracChangeset
for help on using the changeset viewer.