Changeset 102586 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Dec 12, 2023 1:30:02 PM (14 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllThrdFuncs.cpp
r102585 r102586 242 242 * clears flags. */ 243 243 #define IEM_MC_SET_RIP_U16_AND_FINISH_THREADED_PC16_WITH_FLAGS(a_u16NewIP) \ 244 return iemRegRipJumpU16AndFinishClearingRF((pVCpu), (a_u16NewIP) )244 return iemRegRipJumpU16AndFinishClearingRF((pVCpu), (a_u16NewIP), 0 /* cbInstr - not used */) 245 245 246 246 /** Variant of IEM_MC_SET_RIP_U16_AND_FINISH for 386+ targets that checks and 247 247 * clears flags. */ 248 248 #define IEM_MC_SET_RIP_U16_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_u16NewIP) \ 249 return iemRegRipJumpU16AndFinishClearingRF((pVCpu), (a_u16NewIP) )249 return iemRegRipJumpU16AndFinishClearingRF((pVCpu), (a_u16NewIP), 0 /* cbInstr - not used */) 250 250 251 251 /** Variant of IEM_MC_SET_RIP_U16_AND_FINISH for use in 64-bit code that checks and 252 252 * clears flags. */ 253 253 #define IEM_MC_SET_RIP_U16_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_u16NewIP) \ 254 return iemRegRipJumpU16AndFinishClearingRF((pVCpu), (a_u16NewIP) )254 return iemRegRipJumpU16AndFinishClearingRF((pVCpu), (a_u16NewIP), 0 /* cbInstr - not used */) 255 255 256 256 #undef IEM_MC_SET_RIP_U16_AND_FINISH … … 268 268 * clears flags. */ 269 269 #define IEM_MC_SET_RIP_U32_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_u32NewEIP) \ 270 return iemRegRipJumpU32AndFinishClearingRF((pVCpu), (a_u32NewEIP) )270 return iemRegRipJumpU32AndFinishClearingRF((pVCpu), (a_u32NewEIP), 0 /* cbInstr - not used */) 271 271 272 272 /** Variant of IEM_MC_SET_RIP_U32_AND_FINISH for use in 64-bit code that checks 273 273 * and clears flags. */ 274 274 #define IEM_MC_SET_RIP_U32_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_u32NewEIP) \ 275 return iemRegRipJumpU32AndFinishClearingRF((pVCpu), (a_u32NewEIP) )275 return iemRegRipJumpU32AndFinishClearingRF((pVCpu), (a_u32NewEIP), 0 /* cbInstr - not used */) 276 276 277 277 #undef IEM_MC_SET_RIP_U32_AND_FINISH … … 285 285 * and clears flags. */ 286 286 #define IEM_MC_SET_RIP_U64_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_u32NewEIP) \ 287 return iemRegRipJumpU64AndFinishClearingRF((pVCpu), (a_u32NewEIP) )287 return iemRegRipJumpU64AndFinishClearingRF((pVCpu), (a_u32NewEIP), 0 /* cbInstr - not used */) 288 288 289 289 #undef IEM_MC_SET_RIP_U64_AND_FINISH -
trunk/src/VBox/VMM/include/IEMInline.h
r102585 r102586 2773 2773 2774 2774 2775 #ifdef IEM_WITH_CODE_TLB 2775 2776 2776 2777 /** … … 2790 2791 else 2791 2792 return iemRaiseGeneralProtectionFault0(pVCpu); 2792 #ifndef IEM_WITH_CODE_TLB2793 pVCpu->iem.s.cbOpcode = IEM_GET_INSTR_LEN(pVCpu);2794 #endif2795 2793 return iemRegFinishNoFlags(pVCpu); 2796 2794 } … … 2814 2812 else 2815 2813 return iemRaiseGeneralProtectionFault0(pVCpu); 2816 #ifndef IEM_WITH_CODE_TLB2817 pVCpu->iem.s.cbOpcode = IEM_GET_INSTR_LEN(pVCpu);2818 #endif2819 2814 return iemRegFinishNoFlags(pVCpu); 2820 2815 } … … 2838 2833 else 2839 2834 return iemRaiseGeneralProtectionFault0(pVCpu); 2840 #ifndef IEM_WITH_CODE_TLB2841 pVCpu->iem.s.cbOpcode = IEM_GET_INSTR_LEN(pVCpu);2842 #endif2843 2835 return iemRegFinishNoFlags(pVCpu); 2844 2836 } 2845 2837 2838 #endif /* IEM_WITH_CODE_TLB */ 2846 2839 2847 2840 /** … … 2852 2845 * @param pVCpu The cross context virtual CPU structure of the calling thread. 2853 2846 * @param uNewIp The new IP value. 2854 */ 2855 DECLINLINE(VBOXSTRICTRC) iemRegRipJumpU16AndFinishClearingRF(PVMCPUCC pVCpu, uint16_t uNewIp) RT_NOEXCEPT 2847 * @param cbInstr The instruction length, for flushing in the non-TLB case. 2848 */ 2849 DECLINLINE(VBOXSTRICTRC) iemRegRipJumpU16AndFinishClearingRF(PVMCPUCC pVCpu, uint16_t uNewIp, uint8_t cbInstr) RT_NOEXCEPT 2856 2850 { 2857 2851 if (RT_LIKELY( uNewIp <= pVCpu->cpum.GstCtx.cs.u32Limit … … 2861 2855 return iemRaiseGeneralProtectionFault0(pVCpu); 2862 2856 #ifndef IEM_WITH_CODE_TLB 2863 pVCpu->iem.s.cbOpcode = IEM_GET_INSTR_LEN(pVCpu); 2857 iemOpcodeFlushLight(pVCpu, cbInstr); 2858 #else 2859 RT_NOREF_PV(cbInstr); 2864 2860 #endif 2865 2861 return iemRegFinishClearingRF(pVCpu); … … 2874 2870 * @param pVCpu The cross context virtual CPU structure of the calling thread. 2875 2871 * @param uNewEip The new EIP value. 2876 */ 2877 DECLINLINE(VBOXSTRICTRC) iemRegRipJumpU32AndFinishClearingRF(PVMCPUCC pVCpu, uint32_t uNewEip) RT_NOEXCEPT 2872 * @param cbInstr The instruction length, for flushing in the non-TLB case. 2873 */ 2874 DECLINLINE(VBOXSTRICTRC) iemRegRipJumpU32AndFinishClearingRF(PVMCPUCC pVCpu, uint32_t uNewEip, uint8_t cbInstr) RT_NOEXCEPT 2878 2875 { 2879 2876 Assert(pVCpu->cpum.GstCtx.rip <= UINT32_MAX); … … 2884 2881 return iemRaiseGeneralProtectionFault0(pVCpu); 2885 2882 #ifndef IEM_WITH_CODE_TLB 2886 pVCpu->iem.s.cbOpcode = IEM_GET_INSTR_LEN(pVCpu); 2883 iemOpcodeFlushLight(pVCpu, cbInstr); 2884 #else 2885 RT_NOREF_PV(cbInstr); 2887 2886 #endif 2888 2887 return iemRegFinishClearingRF(pVCpu); … … 2898 2897 * @param pVCpu The cross context virtual CPU structure of the calling thread. 2899 2898 * @param uNewRip The new RIP value. 2900 */ 2901 DECLINLINE(VBOXSTRICTRC) iemRegRipJumpU64AndFinishClearingRF(PVMCPUCC pVCpu, uint64_t uNewRip) RT_NOEXCEPT 2899 * @param cbInstr The instruction length, for flushing in the non-TLB case. 2900 */ 2901 DECLINLINE(VBOXSTRICTRC) iemRegRipJumpU64AndFinishClearingRF(PVMCPUCC pVCpu, uint64_t uNewRip, uint8_t cbInstr) RT_NOEXCEPT 2902 2902 { 2903 2903 Assert(IEM_IS_64BIT_CODE(pVCpu)); … … 2907 2907 return iemRaiseGeneralProtectionFault0(pVCpu); 2908 2908 #ifndef IEM_WITH_CODE_TLB 2909 pVCpu->iem.s.cbOpcode = IEM_GET_INSTR_LEN(pVCpu); 2909 iemOpcodeFlushLight(pVCpu, cbInstr); 2910 #else 2911 RT_NOREF_PV(cbInstr); 2910 2912 #endif 2911 2913 return iemRegFinishClearingRF(pVCpu); -
trunk/src/VBox/VMM/include/IEMMc.h
r102585 r102586 73 73 return iemRegRipRelativeJumpS32AndFinishClearingRF(pVCpu, IEM_GET_INSTR_LEN(pVCpu), (a_i32), pVCpu->iem.s.enmEffOpSize) 74 74 /** Sets RIP (may trigger \#GP), finishes the instruction and returns. */ 75 #define IEM_MC_SET_RIP_U16_AND_FINISH(a_u16NewIP) return iemRegRipJumpU16AndFinishClearingRF((pVCpu), (a_u16NewIP)) 75 #define IEM_MC_SET_RIP_U16_AND_FINISH(a_u16NewIP) \ 76 return iemRegRipJumpU16AndFinishClearingRF((pVCpu), (a_u16NewIP), IEM_GET_INSTR_LEN(pVCpu)) 76 77 /** Sets RIP (may trigger \#GP), finishes the instruction and returns. */ 77 #define IEM_MC_SET_RIP_U32_AND_FINISH(a_u32NewIP) return iemRegRipJumpU32AndFinishClearingRF((pVCpu), (a_u32NewIP)) 78 #define IEM_MC_SET_RIP_U32_AND_FINISH(a_u32NewIP) \ 79 return iemRegRipJumpU32AndFinishClearingRF((pVCpu), (a_u32NewIP), IEM_GET_INSTR_LEN(pVCpu)) 78 80 /** Sets RIP (may trigger \#GP), finishes the instruction and returns. */ 79 #define IEM_MC_SET_RIP_U64_AND_FINISH(a_u64NewIP) return iemRegRipJumpU64AndFinishClearingRF((pVCpu), (a_u64NewIP)) 81 #define IEM_MC_SET_RIP_U64_AND_FINISH(a_u64NewIP) \ 82 return iemRegRipJumpU64AndFinishClearingRF((pVCpu), (a_u64NewIP), IEM_GET_INSTR_LEN(pVCpu)) 80 83 81 84 #define IEM_MC_RAISE_DIVIDE_ERROR() return iemRaiseDivideError(pVCpu)
Note:
See TracChangeset
for help on using the changeset viewer.