Changeset 99298 in vbox
- Timestamp:
- Apr 5, 2023 10:27:15 PM (22 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsOneByte.cpp.h
r99287 r99298 2713 2713 case IEMMODE_16BIT: 2714 2714 { 2715 PFNIEMAIMPLBINU16 const pfnAImplU16 = IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u16_eflags); 2715 2716 if (IEM_IS_MODRM_REG_MODE(bRm)) 2716 2717 { … … 2728 2729 IEM_MC_REF_LOCAL(pu16Dst, u16Tmp); 2729 2730 IEM_MC_REF_EFLAGS(pEFlags); 2730 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u16_eflags), 2731 pu16Dst, u16Src, pEFlags); 2731 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU16, pu16Dst, u16Src, pEFlags); 2732 2732 IEM_MC_STORE_GREG_U16(IEM_GET_MODRM_REG(pVCpu, bRm), u16Tmp); 2733 2733 … … 2752 2752 IEM_MC_REF_LOCAL(pu16Dst, u16Tmp); 2753 2753 IEM_MC_REF_EFLAGS(pEFlags); 2754 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u16_eflags), 2755 pu16Dst, u16Src, pEFlags); 2754 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU16, pu16Dst, u16Src, pEFlags); 2756 2755 IEM_MC_STORE_GREG_U16(IEM_GET_MODRM_REG(pVCpu, bRm), u16Tmp); 2757 2756 … … 2764 2763 case IEMMODE_32BIT: 2765 2764 { 2765 PFNIEMAIMPLBINU32 const pfnAImplU32 = IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u32_eflags); 2766 2766 if (IEM_IS_MODRM_REG_MODE(bRm)) 2767 2767 { … … 2779 2779 IEM_MC_REF_LOCAL(pu32Dst, u32Tmp); 2780 2780 IEM_MC_REF_EFLAGS(pEFlags); 2781 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u32_eflags), 2782 pu32Dst, u32Src, pEFlags); 2781 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU32, pu32Dst, u32Src, pEFlags); 2783 2782 IEM_MC_STORE_GREG_U32(IEM_GET_MODRM_REG(pVCpu, bRm), u32Tmp); 2784 2783 … … 2803 2802 IEM_MC_REF_LOCAL(pu32Dst, u32Tmp); 2804 2803 IEM_MC_REF_EFLAGS(pEFlags); 2805 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u32_eflags), 2806 pu32Dst, u32Src, pEFlags); 2804 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU32, pu32Dst, u32Src, pEFlags); 2807 2805 IEM_MC_STORE_GREG_U32(IEM_GET_MODRM_REG(pVCpu, bRm), u32Tmp); 2808 2806 … … 2815 2813 case IEMMODE_64BIT: 2816 2814 { 2815 PFNIEMAIMPLBINU64 const pfnAImplU64 = IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u64_eflags); 2817 2816 if (IEM_IS_MODRM_REG_MODE(bRm)) 2818 2817 { … … 2830 2829 IEM_MC_REF_LOCAL(pu64Dst, u64Tmp); 2831 2830 IEM_MC_REF_EFLAGS(pEFlags); 2832 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u64_eflags), 2833 pu64Dst, u64Src, pEFlags); 2831 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU64, pu64Dst, u64Src, pEFlags); 2834 2832 IEM_MC_STORE_GREG_U64(IEM_GET_MODRM_REG(pVCpu, bRm), u64Tmp); 2835 2833 … … 2854 2852 IEM_MC_REF_LOCAL(pu64Dst, u64Tmp); 2855 2853 IEM_MC_REF_EFLAGS(pEFlags); 2856 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u64_eflags), 2857 pu64Dst, u64Src, pEFlags); 2854 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU64, pu64Dst, u64Src, pEFlags); 2858 2855 IEM_MC_STORE_GREG_U64(IEM_GET_MODRM_REG(pVCpu, bRm), u64Tmp); 2859 2856 … … 2918 2915 { 2919 2916 case IEMMODE_16BIT: 2917 { 2918 PFNIEMAIMPLBINU16 const pfnAImplU16 = IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u16_eflags); 2920 2919 if (IEM_IS_MODRM_REG_MODE(bRm)) 2921 2920 { … … 2933 2932 IEM_MC_REF_LOCAL(pu16Dst, u16Tmp); 2934 2933 IEM_MC_REF_EFLAGS(pEFlags); 2935 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u16_eflags), 2936 pu16Dst, u16Src, pEFlags); 2934 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU16, pu16Dst, u16Src, pEFlags); 2937 2935 IEM_MC_STORE_GREG_U16(IEM_GET_MODRM_REG(pVCpu, bRm), u16Tmp); 2938 2936 … … 2957 2955 IEM_MC_REF_LOCAL(pu16Dst, u16Tmp); 2958 2956 IEM_MC_REF_EFLAGS(pEFlags); 2959 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u16_eflags), 2960 pu16Dst, u16Src, pEFlags); 2957 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU16, pu16Dst, u16Src, pEFlags); 2961 2958 IEM_MC_STORE_GREG_U16(IEM_GET_MODRM_REG(pVCpu, bRm), u16Tmp); 2962 2959 … … 2965 2962 } 2966 2963 break; 2964 } 2967 2965 2968 2966 case IEMMODE_32BIT: 2967 { 2968 PFNIEMAIMPLBINU32 const pfnAImplU32 = IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u32_eflags); 2969 2969 if (IEM_IS_MODRM_REG_MODE(bRm)) 2970 2970 { … … 2982 2982 IEM_MC_REF_LOCAL(pu32Dst, u32Tmp); 2983 2983 IEM_MC_REF_EFLAGS(pEFlags); 2984 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u32_eflags), 2985 pu32Dst, u32Src, pEFlags); 2984 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU32, pu32Dst, u32Src, pEFlags); 2986 2985 IEM_MC_STORE_GREG_U32(IEM_GET_MODRM_REG(pVCpu, bRm), u32Tmp); 2987 2986 … … 3006 3005 IEM_MC_REF_LOCAL(pu32Dst, u32Tmp); 3007 3006 IEM_MC_REF_EFLAGS(pEFlags); 3008 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u32_eflags), 3009 pu32Dst, u32Src, pEFlags); 3007 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU32, pu32Dst, u32Src, pEFlags); 3010 3008 IEM_MC_STORE_GREG_U32(IEM_GET_MODRM_REG(pVCpu, bRm), u32Tmp); 3011 3009 … … 3014 3012 } 3015 3013 break; 3014 } 3016 3015 3017 3016 case IEMMODE_64BIT: 3017 { 3018 PFNIEMAIMPLBINU64 const pfnAImplU64 = IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u64_eflags); 3018 3019 if (IEM_IS_MODRM_REG_MODE(bRm)) 3019 3020 { … … 3031 3032 IEM_MC_REF_LOCAL(pu64Dst, u64Tmp); 3032 3033 IEM_MC_REF_EFLAGS(pEFlags); 3033 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u64_eflags), 3034 pu64Dst, u64Src, pEFlags); 3034 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU64, pu64Dst, u64Src, pEFlags); 3035 3035 IEM_MC_STORE_GREG_U64(IEM_GET_MODRM_REG(pVCpu, bRm), u64Tmp); 3036 3036 … … 3055 3055 IEM_MC_REF_LOCAL(pu64Dst, u64Tmp); 3056 3056 IEM_MC_REF_EFLAGS(pEFlags); 3057 IEM_MC_CALL_VOID_AIMPL_3(IEMTARGETCPU_EFL_BEHAVIOR_SELECT(g_iemAImpl_imul_two_u64_eflags), 3058 pu64Dst, u64Src, pEFlags); 3057 IEM_MC_CALL_VOID_AIMPL_3(pfnAImplU64, pu64Dst, u64Src, pEFlags); 3059 3058 IEM_MC_STORE_GREG_U64(IEM_GET_MODRM_REG(pVCpu, bRm), u64Tmp); 3060 3059 … … 3063 3062 } 3064 3063 break; 3064 } 3065 3065 3066 3066 IEM_NOT_REACHED_DEFAULT_CASE_RET(); … … 5886 5886 } IEM_MC_ENDIF(); \ 5887 5887 IEM_MC_ADVANCE_RIP_AND_FINISH(); \ 5888 IEM_MC_END() ;5888 IEM_MC_END() \ 5889 5889 5890 5890 /** … … 6035 6035 } IEM_MC_ENDIF(); \ 6036 6036 IEM_MC_ADVANCE_RIP_AND_FINISH(); \ 6037 IEM_MC_END() ;6037 IEM_MC_END() \ 6038 6038 6039 6039 /** … … 6241 6241 } IEM_MC_ENDIF(); \ 6242 6242 IEM_MC_ADVANCE_RIP_AND_FINISH(); \ 6243 IEM_MC_END() ;6243 IEM_MC_END() \ 6244 6244 6245 6245 /** … … 6379 6379 } IEM_MC_ENDIF(); \ 6380 6380 IEM_MC_ADVANCE_RIP_AND_FINISH(); \ 6381 IEM_MC_END() ;6381 IEM_MC_END() \ 6382 6382 6383 6383 /** … … 12492 12492 } 12493 12493 } 12494 12495 typedef IEM_CIMPL_DECL_TYPE_3(FNIEMCIMPLFARBRANCH, uint16_t, uSel, uint64_t, offSeg, IEMMODE, enmOpSize);12496 typedef FNIEMCIMPLFARBRANCH *PFNIEMCIMPLFARBRANCH;12497 12494 12498 12495 FNIEMOP_DEF_2(iemOpHlp_Grp5_far_Ep, uint8_t, bRm, PFNIEMCIMPLFARBRANCH, pfnCImpl) -
trunk/src/VBox/VMM/VMMAll/IEMAllThreadedPython.py
r99296 r99298 270 270 offBits = sMember.rfind('U') + 1; 271 271 if sBaseType == 'PCIEMOPBINSIZES': return 'PFNIEMAIMPLBINU' + sMember[offBits:]; 272 if sBaseType == 'PCIEMOPUNARYSIZES': return 'PFNIEMAIMPL BINU'+ sMember[offBits:];272 if sBaseType == 'PCIEMOPUNARYSIZES': return 'PFNIEMAIMPLUNARYU' + sMember[offBits:]; 273 273 if sBaseType == 'PCIEMOPSHIFTSIZES': return 'PFNIEMAIMPLSHIFTU' + sMember[offBits:]; 274 274 if sBaseType == 'PCIEMOPSHIFTDBLSIZES': return 'PFNIEMAIMPLSHIFTDBLU' + sMember[offBits:]; … … 291 291 """ 292 292 idxReg = 0; 293 if ( oStmt.sName.find('_ STORE_') > 0293 if ( oStmt.sName.find('_FETCH_') > 0 294 294 or oStmt.sName.find('_REF_') > 0 295 295 or oStmt.sName.find('_TO_LOCAL') > 0): -
trunk/src/VBox/VMM/VMMAll/IEMThreadedFunctions.cpp
r99291 r99298 133 133 return (a_pfnCImpl)(pVCpu, (a_cbInstr), a0, a1, a2, a3) 134 134 135 /** Variant of IEM_MC_CALL_CIMPL_5 with explicit instruction length parameter. */ 136 # define IEM_MC_CALL_CIMPL_5_THREADED(a_cbInstr, a_pfnCImpl, a0, a1, a2, a3, a4) \ 137 return (a_pfnCImpl)(pVCpu, (a_cbInstr), a0, a1, a2, a3, a4) 138 139 /** Variant of IEM_MC_FETCH_GREG_U8 with extended (20) register index. */ 140 #define IEM_MC_FETCH_GREG_U8_THREADED(a_u8Dst, a_iGRegEx) \ 141 (a_u8Dst) = iemGRegFetchU8Ex(pVCpu, (a_iGRegEx)) 142 143 /** Variant of IEM_MC_FETCH_GREG_U8_ZX_U16 with extended (20) register index. */ 144 #define IEM_MC_FETCH_GREG_U8_ZX_U16_THREADED(a_u16Dst, a_iGRegEx) \ 145 (a_u16Dst) = iemGRegFetchU8Ex(pVCpu, (a_iGRegEx)) 146 147 /** Variant of IEM_MC_FETCH_GREG_U8_ZX_U32 with extended (20) register index. */ 148 #define IEM_MC_FETCH_GREG_U8_ZX_U32_THREADED(a_u32Dst, a_iGRegEx) \ 149 (a_u32Dst) = iemGRegFetchU8Ex(pVCpu, (a_iGRegEx)) 150 151 /** Variant of IEM_MC_FETCH_GREG_U8_ZX_U64 with extended (20) register index. */ 152 #define IEM_MC_FETCH_GREG_U8_ZX_U64_THREADED(a_u64Dst, a_iGRegEx) \ 153 (a_u64Dst) = iemGRegFetchU8Ex(pVCpu, (a_iGRegEx)) 154 155 /** Variant of IEM_MC_FETCH_GREG_U8_SX_U16 with extended (20) register index. */ 156 #define IEM_MC_FETCH_GREG_U8_SX_U16_THREADED(a_u16Dst, a_iGRegEx) \ 157 (a_u16Dst) = (int8_t)iemGRegFetchU8Ex(pVCpu, (a_iGRegEx)) 158 159 /** Variant of IEM_MC_FETCH_GREG_U8_SX_U32 with extended (20) register index. */ 160 #define IEM_MC_FETCH_GREG_U8_SX_U32_THREADED(a_u32Dst, a_iGRegEx) \ 161 (a_u32Dst) = (int8_t)iemGRegFetchU8Ex(pVCpu, (a_iGRegEx)) 162 163 /** Variant of IEM_MC_FETCH_GREG_U8_SX_U64 with extended (20) register index. */ 164 #define IEM_MC_FETCH_GREG_U8_SX_U64_THREADED(a_u64Dst, a_iGRegEx) \ 165 (a_u64Dst) = (int8_t)iemGRegFetchU8Ex(pVCpu, (a_iGRegEx)) 166 167 /** Variant of IEM_MC_STORE_GREG_U8 with extended (20) register index. */ 168 #define IEM_MC_STORE_GREG_U8_THREADED(a_iGRegEx, a_u8Value) \ 169 *iemGRegRefU8Ex(pVCpu, (a_iGRegEx)) = (a_u8Value) 170 171 /** Variant of IEM_MC_STORE_GREG_U8 with extended (20) register index. */ 172 #define IEM_MC_STORE_GREG_U8_CONST_THREADED(a_iGRegEx, a_u8Value) \ 173 *iemGRegRefU8Ex(pVCpu, (a_iGRegEx)) = (a_u8Value) 174 175 /** Variant of IEM_MC_REF_GREG_U8 with extended (20) register index. */ 176 #define IEM_MC_REF_GREG_U8_THREADED(a_pu8Dst, a_iGRegEx) \ 177 (a_pu8Dst) = iemGRegRefU8Ex(pVCpu, (a_iGRegEx)) 178 179 /** Variant of IEM_MC_ADD_GREG_U8 with extended (20) register index. */ 180 #define IEM_MC_ADD_GREG_U8_THREADED(a_iGRegEx, a_u8Value) \ 181 *iemGRegRefU8Ex(pVCpu, (a_iGRegEx)) += (a_u8Value) 182 183 /** Variant of IEM_MC_SUB_GREG_U8 with extended (20) register index. */ 184 #define IEM_MC_SUB_GREG_U8_THREADED(a_iGRegEx, a_u8Value) \ 185 *iemGRegRefU8Ex(pVCpu, (a_iGRegEx)) -= (a_u8Value) 186 187 /** Variant of IEM_MC_ADD_GREG_U8_TO_LOCAL with extended (20) register index. */ 188 #define IEM_MC_ADD_GREG_U8_TO_LOCAL_THREADED(a_u8Value, a_iGRegEx) \ 189 do { (a_u8Value) += iemGRegFetchU8Ex(pVCpu, (a_iGRegEx)); } while (0) 190 191 /** Variant of IEM_MC_AND_GREG_U8 with extended (20) register index. */ 192 #define IEM_MC_AND_GREG_U8_THREADED(a_iGRegEx, a_u8Value) \ 193 *iemGRegRefU8Ex(pVCpu, (a_iGRegEx)) &= (a_u8Value) 194 195 /** Variant of IEM_MC_OR_GREG_U8 with extended (20) register index. */ 196 #define IEM_MC_OR_GREG_U8_THREADED(a_iGRegEx, a_u8Value) \ 197 *iemGRegRefU8Ex(pVCpu, (a_iGRegEx)) |= (a_u8Value) 135 198 136 199 /** -
trunk/src/VBox/VMM/include/IEMInline.h
r99296 r99298 1550 1550 /** 1551 1551 * Gets a reference (pointer) to the specified 8-bit general purpose register, 1552 * alternative version with extended register index.1552 * alternative version with extended (20) register index. 1553 1553 * 1554 1554 * @returns Register reference. … … 1666 1666 } 1667 1667 #endif 1668 1669 1670 /** 1671 * Fetches the value of a 8-bit general purpose register, alternative version 1672 * with extended (20) register index. 1673 1674 * @returns The register value. 1675 * @param pVCpu The cross context virtual CPU structure of the calling thread. 1676 * @param iRegEx The register. The 16 first are regular ones, 1677 * whereas 16 thru 19 maps to AH, CH, DH and BH. 1678 */ 1679 DECLINLINE(uint8_t) iemGRegFetchU8Ex(PVMCPUCC pVCpu, uint8_t iRegEx) RT_NOEXCEPT 1680 { 1681 return *iemGRegRefU8Ex(pVCpu, iRegEx); 1682 } 1668 1683 1669 1684 -
trunk/src/VBox/VMM/include/IEMInternal.h
r98969 r99298 4062 4062 IEM_CIMPL_PROTO_3(iemCImpl_FarJmp, uint16_t, uSel, uint64_t, offSeg, IEMMODE, enmEffOpSize); 4063 4063 IEM_CIMPL_PROTO_3(iemCImpl_callf, uint16_t, uSel, uint64_t, offSeg, IEMMODE, enmEffOpSize); 4064 typedef IEM_CIMPL_DECL_TYPE_3(FNIEMCIMPLFARBRANCH, uint16_t, uSel, uint64_t, offSeg, IEMMODE, enmEffOpSize); 4065 typedef FNIEMCIMPLFARBRANCH *PFNIEMCIMPLFARBRANCH; 4064 4066 IEM_CIMPL_PROTO_2(iemCImpl_retf, IEMMODE, enmEffOpSize, uint16_t, cbPop); 4065 4067 IEM_CIMPL_PROTO_0(iemCImpl_retn_16);
Note:
See TracChangeset
for help on using the changeset viewer.