Changeset 101984 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Nov 8, 2023 3:56:18 PM (18 months ago)
- svn:sync-xref-src-repo-rev:
- 160081
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInternal.h
r101722 r101984 619 619 /** Force end of TB after the instruction. */ 620 620 #define IEM_CIMPL_F_END_TB RT_BIT_32(15) 621 /** Flag set if a branch may also modify the stack (push/pop return address). */ 622 #define IEM_CIMPL_F_BRANCH_STACK RT_BIT_32(16) 623 /** Flag set if a branch may also modify the stack (push/pop return address) 624 * and switch it (load/restore SS:RSP). */ 625 #define IEM_CIMPL_F_BRANCH_STACK_FAR RT_BIT_32(17) 621 626 /** Convenience: Raise exception (technically unnecessary, since it shouldn't return VINF_SUCCESS). */ 622 627 #define IEM_CIMPL_F_XCPT \ 623 (IEM_CIMPL_F_BRANCH_INDIRECT | IEM_CIMPL_F_BRANCH_FAR | IEM_CIMPL_F_MODE | IEM_CIMPL_F_RFLAGS | IEM_CIMPL_F_VMEXIT) 628 (IEM_CIMPL_F_BRANCH_INDIRECT | IEM_CIMPL_F_BRANCH_FAR | IEM_CIMPL_F_BRANCH_STACK_FAR \ 629 | IEM_CIMPL_F_MODE | IEM_CIMPL_F_RFLAGS | IEM_CIMPL_F_VMEXIT) 624 630 625 631 /** The block calls a C-implementation instruction function with two implicit arguments. … … 627 633 * IEM_CIMPL_F_CALLS_AIMPL_WITH_FXSTATE. 628 634 * @note The python scripts will add this is missing. */ 629 #define IEM_CIMPL_F_CALLS_CIMPL RT_BIT_32(1 6)635 #define IEM_CIMPL_F_CALLS_CIMPL RT_BIT_32(18) 630 636 /** The block calls an ASM-implementation instruction function. 631 637 * Mutually exclusive with IEM_CIMPL_F_CALLS_CIMPL and 632 638 * IEM_CIMPL_F_CALLS_AIMPL_WITH_FXSTATE. 633 639 * @note The python scripts will add this is missing. */ 634 #define IEM_CIMPL_F_CALLS_AIMPL RT_BIT_32(1 7)640 #define IEM_CIMPL_F_CALLS_AIMPL RT_BIT_32(19) 635 641 /** The block calls an ASM-implementation instruction function with an implicit 636 642 * X86FXSTATE pointer argument. 637 643 * Mutually exclusive with IEM_CIMPL_F_CALLS_CIMPL and IEM_CIMPL_F_CALLS_AIMPL. 638 644 * @note The python scripts will add this is missing. */ 639 #define IEM_CIMPL_F_CALLS_AIMPL_WITH_FXSTATE RT_BIT_32( 18)645 #define IEM_CIMPL_F_CALLS_AIMPL_WITH_FXSTATE RT_BIT_32(20) 640 646 /** @} */ 641 647 … … 1305 1311 /** @name IEMBRANCHED_F_XXX - Branched indicator (IEMCPU::fTbBranched). 1306 1312 * 1307 * These flags parallels IEM_CIMPL_F_BRANCH_XXX.1313 * These flags parallels the main IEM_CIMPL_F_BRANCH_XXX flags. 1308 1314 * 1309 1315 * @{ */ … … 1320 1326 /** Flag set if it's a far branch. */ 1321 1327 #define IEMBRANCHED_F_FAR UINT8_C(0x10) 1328 /** Flag set if the stack pointer is modified. */ 1329 #define IEMBRANCHED_F_STACK UINT8_C(0x20) 1330 /** Flag set if the stack pointer and (maybe) the stack segment are modified. */ 1331 #define IEMBRANCHED_F_STACK_FAR UINT8_C(0x40) 1322 1332 /** Flag set (by IEM_MC_REL_JMP_XXX) if it's a zero bytes relative jump. */ 1323 #define IEMBRANCHED_F_ZERO UINT8_C(0x 20)1333 #define IEMBRANCHED_F_ZERO UINT8_C(0x80) 1324 1334 /** @} */ 1325 1335 … … 4920 4930 * @return Strict VBox status code. 4921 4931 */ 4922 #define IEMOP_RAISE_DIVIDE_ERROR_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, iemCImplRaiseDivideError)4932 #define IEMOP_RAISE_DIVIDE_ERROR_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, 0, iemCImplRaiseDivideError) 4923 4933 4924 4934 /** … … 4930 4940 * @return Strict VBox status code. 4931 4941 */ 4932 #define IEMOP_RAISE_INVALID_LOCK_PREFIX_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, iemCImplRaiseInvalidLockPrefix)4942 #define IEMOP_RAISE_INVALID_LOCK_PREFIX_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, 0, iemCImplRaiseInvalidLockPrefix) 4933 4943 4934 4944 /** … … 4940 4950 * @return Strict VBox status code. 4941 4951 */ 4942 #define IEMOP_RAISE_INVALID_OPCODE_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, iemCImplRaiseInvalidOpcode)4952 #define IEMOP_RAISE_INVALID_OPCODE_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, 0, iemCImplRaiseInvalidOpcode) 4943 4953 4944 4954 /** … … 4951 4961 * @see IEMOP_RAISE_INVALID_OPCODE_RET 4952 4962 */ 4953 #define IEMOP_RAISE_INVALID_OPCODE_RUNTIME_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, iemCImplRaiseInvalidOpcode)4963 #define IEMOP_RAISE_INVALID_OPCODE_RUNTIME_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, 0, iemCImplRaiseInvalidOpcode) 4954 4964 4955 4965 /** @} */ -
trunk/src/VBox/VMM/include/IEMMc.h
r101958 r101984 2101 2101 * 2102 2102 * @param a_fFlags IEM_CIMPL_F_XXX. 2103 * @param a_fGstShwFlush Guest shadow register copies needing to be flushed 2104 * in the native recompiler. 2103 2105 * @param a_pfnCImpl The pointer to the C routine. 2104 2106 * @sa IEM_DECL_IMPL_C_TYPE_0 and IEM_CIMPL_DEF_0. 2105 2107 */ 2106 #define IEM_MC_DEFER_TO_CIMPL_0_RET(a_fFlags, a_ pfnCImpl) \2108 #define IEM_MC_DEFER_TO_CIMPL_0_RET(a_fFlags, a_fGstShwFlush, a_pfnCImpl) \ 2107 2109 IEM_MC_CALL_CIMPL_HLP_RET(a_fFlags, (a_pfnCImpl)(pVCpu, IEM_GET_INSTR_LEN(pVCpu))) 2108 2110 … … 2114 2116 * 2115 2117 * @param a_fFlags IEM_CIMPL_F_XXX. 2118 * @param a_fGstShwFlush Guest shadow register copies needing to be flushed 2119 * in the native recompiler. 2116 2120 * @param a_pfnCImpl The pointer to the C routine. 2117 2121 * @param a0 The argument. 2118 2122 */ 2119 #define IEM_MC_DEFER_TO_CIMPL_1_RET(a_fFlags, a_ pfnCImpl, a0) \2123 #define IEM_MC_DEFER_TO_CIMPL_1_RET(a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0) \ 2120 2124 IEM_MC_CALL_CIMPL_HLP_RET(a_fFlags, (a_pfnCImpl)(pVCpu, IEM_GET_INSTR_LEN(pVCpu), a0)) 2121 2125 … … 2127 2131 * 2128 2132 * @param a_fFlags IEM_CIMPL_F_XXX. 2133 * @param a_fGstShwFlush Guest shadow register copies needing to be flushed 2134 * in the native recompiler. 2129 2135 * @param a_pfnCImpl The pointer to the C routine. 2130 2136 * @param a0 The first extra argument. 2131 2137 * @param a1 The second extra argument. 2132 2138 */ 2133 #define IEM_MC_DEFER_TO_CIMPL_2_RET(a_fFlags, a_ pfnCImpl, a0, a1) \2139 #define IEM_MC_DEFER_TO_CIMPL_2_RET(a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0, a1) \ 2134 2140 IEM_MC_CALL_CIMPL_HLP_RET(a_fFlags, (a_pfnCImpl)(pVCpu, IEM_GET_INSTR_LEN(pVCpu), a0, a1)) 2135 2141 … … 2141 2147 * 2142 2148 * @param a_fFlags IEM_CIMPL_F_XXX. 2149 * @param a_fGstShwFlush Guest shadow register copies needing to be flushed 2150 * in the native recompiler. 2143 2151 * @param a_pfnCImpl The pointer to the C routine. 2144 2152 * @param a0 The first extra argument. … … 2146 2154 * @param a2 The third extra argument. 2147 2155 */ 2148 #define IEM_MC_DEFER_TO_CIMPL_3_RET(a_fFlags, a_ pfnCImpl, a0, a1, a2) \2156 #define IEM_MC_DEFER_TO_CIMPL_3_RET(a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0, a1, a2) \ 2149 2157 IEM_MC_CALL_CIMPL_HLP_RET(a_fFlags, (a_pfnCImpl)(pVCpu, IEM_GET_INSTR_LEN(pVCpu), a0, a1, a2)) 2150 2158 -
trunk/src/VBox/VMM/include/IEMN8veRecompiler.h
r101913 r101984 348 348 { 349 349 kIemNativeGstReg_GprFirst = 0, 350 kIemNativeGstReg_GprLast = 15,350 kIemNativeGstReg_GprLast = kIemNativeGstReg_GprFirst + 15, 351 351 kIemNativeGstReg_Pc, 352 kIemNativeGstReg_EFlags, /**< This one is problematic since the higher bits are used internally. */ 353 /* gap: 18..23 */ 354 kIemNativeGstReg_SegSelFirst = 24, 355 kIemNativeGstReg_SegSelLast = 29, 356 kIemNativeGstReg_SegBaseFirst = 30, 357 kIemNativeGstReg_SegBaseLast = 35, 358 kIemNativeGstReg_SegLimitFirst = 36, 359 kIemNativeGstReg_SegLimitLast = 41, 352 kIemNativeGstReg_EFlags, /**< 32-bit, includes internal flags. */ 353 kIemNativeGstReg_SegSelFirst, 354 kIemNativeGstReg_SegSelLast = kIemNativeGstReg_SegSelFirst + 5, 355 kIemNativeGstReg_SegBaseFirst, 356 kIemNativeGstReg_SegBaseLast = kIemNativeGstReg_SegBaseFirst + 5, 357 kIemNativeGstReg_SegLimitFirst, 358 kIemNativeGstReg_SegLimitLast = kIemNativeGstReg_SegLimitFirst + 5, 360 359 kIemNativeGstReg_End 361 360 } IEMNATIVEGSTREG;
Note:
See TracChangeset
for help on using the changeset viewer.