Changeset 101661 in vbox
- Timestamp:
- Oct 30, 2023 2:55:00 PM (15 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r101641 r101661 613 613 { 614 614 #ifdef IEMEXECMEM_USE_ALT_SUB_ALLOCATOR 615 uint32_t const idxFirst = offChunk >> IEMEXECMEM_ALT_SUB_ALLOC_UNIT_SHIFT;616 uint32_t const cReqUnits = cb >> IEMEXECMEM_ALT_SUB_ALLOC_UNIT_SHIFT;615 uint32_t const idxFirst = (uint32_t)offChunk >> IEMEXECMEM_ALT_SUB_ALLOC_UNIT_SHIFT; 616 uint32_t const cReqUnits = (uint32_t)cb >> IEMEXECMEM_ALT_SUB_ALLOC_UNIT_SHIFT; 617 617 618 618 /* Check that it's valid and free it. */ … … 750 750 */ 751 751 uint8_t fRet = RtlAddFunctionTable(paFunctions, cFunctionEntries, (uintptr_t)pvChunk); 752 AssertReturn(fRet, NULL); /* Nothing to clean up on failure, since its within the chunk itself. */753 754 return paFunctions;752 AssertReturn(fRet, VERR_INTERNAL_ERROR_3); /* Nothing to clean up on failure, since its within the chunk itself. */ 753 754 return VINF_SUCCESS; 755 755 } 756 756 … … 1572 1572 pVCpu->iem.s.cInstructions += idxInstr; 1573 1573 iemRaiseGeneralProtectionFault0Jmp(pVCpu); 1574 #ifndef _MSC_VER 1574 1575 return VINF_IEM_RAISED_XCPT; /* not reached */ 1576 #endif 1575 1577 } 1576 1578 … … 1899 1901 1900 1902 uint32_t const cbNew = cNew * sizeof(IEMNATIVEINSTR); 1901 #if RT_ARCH_ARM641903 #ifdef RT_ARCH_ARM64 1902 1904 AssertReturn(cbNew <= _1M, NULL); /* Limited by the branch instruction range (18+2 bits). */ 1903 1905 #else … … 2122 2124 } const g_aGstShadowInfo[] = 2123 2125 { 2124 #define CPUMCTX_OFF_AND_SIZE(a_Reg) RT_UOFFSETOF(VMCPU, cpum.GstCtx. a_Reg), RT_SIZEOFMEMB(VMCPU, cpum.GstCtx. a_Reg)2126 #define CPUMCTX_OFF_AND_SIZE(a_Reg) (uint32_t)RT_UOFFSETOF(VMCPU, cpum.GstCtx. a_Reg), RT_SIZEOFMEMB(VMCPU, cpum.GstCtx. a_Reg) 2125 2127 /* [kIemNativeGstReg_GprFirst + X86_GREG_xAX] = */ { CPUMCTX_OFF_AND_SIZE(rax), "rax", }, 2126 2128 /* [kIemNativeGstReg_GprFirst + X86_GREG_xCX] = */ { CPUMCTX_OFF_AND_SIZE(rcx), "rcx", }, … … 3462 3464 if (cAddParams > 2) 3463 3465 off = iemNativeEmitStoreImm64ByBp(pReNative, off, IEMNATIVE_FP_OFF_STACK_ARG1, uParam2); 3464 off = iemNativeEmitLeaG rpByBp(pReNative, off, X86_GREG_xCX, IEMNATIVE_FP_OFF_IN_SHADOW_ARG0); /* rcStrict */3466 off = iemNativeEmitLeaGprByBp(pReNative, off, X86_GREG_xCX, IEMNATIVE_FP_OFF_IN_SHADOW_ARG0); /* rcStrict */ 3465 3467 3466 3468 #else … … 3526 3528 off = iemNativeEmitLoadGprImm64(pReNative, off, X86_GREG_x10, pCallEntry->auParams[2]); 3527 3529 off = iemNativeEmitStoreGprByBp(pReNative, off, IEMNATIVE_FP_OFF_STACK_ARG0, X86_GREG_x10); 3528 off = iemNativeEmitLeaG rpByBp(pReNative, off, X86_GREG_xCX, IEMNATIVE_FP_OFF_IN_SHADOW_ARG0); /* rcStrict */3530 off = iemNativeEmitLeaGprByBp(pReNative, off, X86_GREG_xCX, IEMNATIVE_FP_OFF_IN_SHADOW_ARG0); /* rcStrict */ 3529 3531 # endif /* VBOXSTRICTRC_STRICT_ENABLED */ 3530 3532 # else … … 5125 5127 AssertCompile(RT_ELEMENTS(s_aModes) == IEM_F_MODE_MASK + 1); 5126 5128 memcpy(pszBuf, s_aModes[fFlags & IEM_F_MODE_MASK].psz, s_aModes[fFlags & IEM_F_MODE_MASK].cch); 5127 unsignedoff = s_aModes[fFlags & IEM_F_MODE_MASK].cch;5129 size_t off = s_aModes[fFlags & IEM_F_MODE_MASK].cch; 5128 5130 5129 5131 pszBuf[off++] = ' '; … … 5598 5600 } 5599 5601 iemNativeDbgInfoAddThreadedCall(pReNative, (IEMTHREADEDFUNCS)pCallEntry->enmFunction, pfnRecom != NULL); 5600 #endif 5601 5602 #ifdef VBOX_STRICT 5602 #elif defined(VBOX_STRICT) 5603 5603 off = iemNativeEmitMarker(pReNative, off, 5604 5604 RT_MAKE_U32((pTb->Thrd.cCalls - cCallsLeft - 1) | (pfnRecom ? 0x8000 : 0), -
trunk/src/VBox/VMM/VMMAll/IEMAllThrdPython.py
r101640 r101661 87 87 'IEMPCMPISTRXSRC': ( 256, False, 'IEMPCMPISTRXSRC', ), 88 88 'IEMPCMPESTRXSRC': ( 384, False, 'IEMPCMPESTRXSRC', ), 89 } | g_kdTypeInfo; 89 }; #| g_kdTypeInfo; - requires 3.9 90 g_kdTypeInfo2.update(g_kdTypeInfo); 90 91 91 92 def getTypeBitCount(sType): … … 1785 1786 cNative += 1; 1786 1787 print('debug: %.1f%% / %u out of %u threaded function variations are recompilable' 1787 % (cNative * 100.0 / cTotal, cNative, cTotal) );1788 % (cNative * 100.0 / cTotal, cNative, cTotal), file = sys.stderr); 1788 1789 1789 1790 # Gather arguments + variable statistics for the MC blocks. … … 1820 1821 1821 1822 print('debug: max vars+args: %u bytes / %u; max vars: %u bytes / %u; max args: %u bytes / %u' 1822 % (cbMaxVarsAndArgs, cMaxVarsAndArgs, cbMaxVars, cMaxVars, cbMaxArgs, cMaxArgs,) );1823 % (cbMaxVarsAndArgs, cMaxVarsAndArgs, cbMaxVars, cMaxVars, cbMaxArgs, cMaxArgs,), file = sys.stderr); 1823 1824 1824 1825 return True; … … 2473 2474 help = 'Displays the version/revision of the script and exit.'); 2474 2475 self.oOptions = oParser.parse_args(asArgs[1:]); 2475 print("oOptions=%s" % (self.oOptions,) );2476 print("oOptions=%s" % (self.oOptions,), file = sys.stderr); 2476 2477 2477 2478 # -
trunk/src/VBox/VMM/include/IEMN8veRecompiler.h
r101640 r101661 2872 2872 { 2873 2873 /* test Eb, imm8 */ 2874 if (iGprSrc >= 8)2875 pbCodeBuf[off++] = X86_OP_REX_B;2874 if (iGprSrc >= 4) 2875 pbCodeBuf[off++] = iGprSrc >= 8 ? X86_OP_REX_B : X86_OP_REX; 2876 2876 pbCodeBuf[off++] = 0xf6; 2877 2877 pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 0, iGprSrc & 7); … … 2962 2962 uint8_t * const pbCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 7); 2963 2963 AssertReturn(pbCodeBuf, UINT32_MAX); 2964 if (iGprSrc >= 8)2965 pbCodeBuf[off++] = X86_OP_REX_B;2966 2964 if (fBits <= UINT8_MAX) 2967 2965 { 2966 if (iGprSrc >= 4) 2967 pbCodeBuf[off++] = iGprSrc >= 8 ? X86_OP_REX_B : X86_OP_REX; 2968 2968 pbCodeBuf[off++] = 0xf6; 2969 2969 pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 0, iGprSrc & 7); … … 2972 2972 else 2973 2973 { 2974 if (iGprSrc >= 8) 2975 pbCodeBuf[off++] = X86_OP_REX_B; 2974 2976 pbCodeBuf[off++] = 0xf7; 2975 2977 pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 0, iGprSrc & 7);
Note:
See TracChangeset
for help on using the changeset viewer.