Changeset 100731 in vbox for trunk/src/VBox/VMM/include/IEMInternal.h
- Timestamp:
- Jul 28, 2023 10:22:22 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInternal.h
r100695 r100731 81 81 * Linux, but it should be quite a bit faster for normal code. 82 82 */ 83 #if (defined( IEM_WITH_SETJMP) && defined(IN_RING3) && (defined(__GNUC__) || defined(_MSC_VER))) \83 #if (defined(__cplusplus) && defined(IEM_WITH_SETJMP) && defined(IN_RING3) && (defined(__GNUC__) || defined(_MSC_VER))) \ 84 84 || defined(DOXYGEN_RUNNING) 85 85 # define IEM_WITH_THROW_CATCH … … 843 843 typedef IEMTB const *PCIEMTB; 844 844 845 /** @name IEMBRANCHED_F_XXX - Branched indicator (IEMCPU::fTbBranched). 846 * 847 * These flags parallels IEM_CIMPL_F_BRANCH_XXX. 848 * 849 * @{ */ 850 /** Value if no branching happened recently. */ 851 #define IEMBRANCHED_F_NO UINT8_C(0x00) 852 /** Flag set if direct branch, clear if absolute or indirect. */ 853 #define IEMBRANCHED_F_DIRECT UINT8_C(0x01) 854 /** Flag set if indirect branch, clear if direct or relative. */ 855 #define IEMBRANCHED_F_INDIRECT UINT8_C(0x02) 856 /** Flag set if relative branch, clear if absolute or indirect. */ 857 #define IEMBRANCHED_F_RELATIVE UINT8_C(0x04) 858 /** Flag set if conditional branch, clear if unconditional. */ 859 #define IEMBRANCHED_F_CONDITIONAL UINT8_C(0x08) 860 /** Flag set if it's a far branch. */ 861 #define IEMBRANCHED_F_FAR UINT8_C(0x10) 862 /** Flag set (by IEM_MC_REL_JMP_XXX) if it's a zero bytes relative jump. */ 863 #define IEMBRANCHED_F_ZERO UINT8_C(0x20) 864 /** @} */ 865 845 866 846 867 /** … … 1139 1160 * This is set by a previous instruction if it modified memory or similar. */ 1140 1161 bool fTbCheckOpcodes; 1141 /** Whether we just branched and need to start a new opcode range and emit code 1142 * to do a TLB load and check them again. */ 1143 bool fTbBranched; 1162 /** Indicates whether and how we just branched - IEMBRANCHED_F_XXX. */ 1163 uint8_t fTbBranched; 1144 1164 /** Set when GCPhysInstrBuf is updated because of a page crossing. */ 1145 1165 bool fTbCrossedPage; … … 1148 1168 /** Spaced reserved for recompiler data / alignment. */ 1149 1169 bool afRecompilerStuff1[4]; 1170 /** Previous GCPhysInstrBuf value - only valid if fTbCrossedPage is set. */ 1171 RTGCPHYS GCPhysInstrBufPrev; 1172 /** Copy of IEMCPU::GCPhysInstrBuf after decoding a branch instruction. 1173 * This is used together with fTbBranched and GCVirtTbBranchSrcBuf to determin 1174 * whether a branch instruction jumps to a new page or stays within the 1175 * current one. */ 1176 RTGCPHYS GCPhysTbBranchSrcBuf; 1177 /** Copy of IEMCPU::uInstrBufPc after decoding a branch instruction. */ 1178 uint64_t GCVirtTbBranchSrcBuf; 1179 /* Alignment. */ 1180 uint64_t au64RecompilerStuff2[5]; 1150 1181 /** Threaded TB statistics: Number of instructions per TB. */ 1151 1182 STAMPROFILE StatTbThreadedInstr; … … 4386 4417 4387 4418 /** 4388 * Macro for calling iemCImplRaiseInvalidOpcode() .4389 * 4390 * This enables us to add/remove arguments and force different levels of4391 * inlining as we wish.4419 * Macro for calling iemCImplRaiseInvalidOpcode() for decode/static \#UDs. 4420 * 4421 * This is for things that will _always_ decode to an \#UD, taking the 4422 * recompiler into consideration and everything. 4392 4423 * 4393 4424 * @return Strict VBox status code. 4394 4425 */ 4395 4426 #define IEMOP_RAISE_INVALID_OPCODE_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, iemCImplRaiseInvalidOpcode) 4427 4428 /** 4429 * Macro for calling iemCImplRaiseInvalidOpcode() for runtime-style \#UDs. 4430 * 4431 * Using this macro means you've got _buggy_ _code_ and are doing things that 4432 * belongs exclusively in IEMAllCImpl.cpp during decoding. 4433 * 4434 * @return Strict VBox status code. 4435 * @see IEMOP_RAISE_INVALID_OPCODE_RET 4436 */ 4437 #define IEMOP_RAISE_INVALID_OPCODE_RUNTIME_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, iemCImplRaiseInvalidOpcode) 4438 4396 4439 /** @} */ 4397 4440 … … 4899 4942 4900 4943 void iemThreadedTbObsolete(PVMCPUCC pVCpu, PIEMTB pTb); 4944 4901 4945 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckMode, 4902 4946 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4903 4947 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckCsLim, 4904 4948 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4949 4905 4950 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckCsLimAndOpcodes, 4906 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2));4907 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckCsLimAndOpcodesAcrossPageLoadingTlb,4908 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2));4909 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckCsLimAndOpcodesLoadingTlb,4910 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2));4911 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckCsLimAndOpcodesOnNextPageLoadingTlb,4912 4951 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4913 4952 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckOpcodes, 4914 4953 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4915 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckOpcodesAcrossPageLoadingTlb, 4954 4955 /* Branching: */ 4956 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckCsLimAndPcAndOpcodes, 4957 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4958 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckPcAndOpcodes, 4959 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4960 4961 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckCsLimAndOpcodesLoadingTlb, 4916 4962 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4917 4963 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckOpcodesLoadingTlb, 4918 4964 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4965 4966 /* Natural page crossing: */ 4967 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckCsLimAndOpcodesAcrossPageLoadingTlb, 4968 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4969 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckOpcodesAcrossPageLoadingTlb, 4970 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4971 4972 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckCsLimAndOpcodesOnNextPageLoadingTlb, 4973 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4919 4974 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckOpcodesOnNextPageLoadingTlb, 4920 4975 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4921 4976 4977 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckCsLimAndOpcodesOnNewPageLoadingTlb, 4978 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4979 IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, iemThreadedFunc_BltIn_CheckOpcodesOnNewPageLoadingTlb, 4980 (PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)); 4981 4982 4922 4983 4923 4984 extern const PFNIEMOP g_apfnIemInterpretOnlyOneByteMap[256];
Note:
See TracChangeset
for help on using the changeset viewer.