Changeset 37003 in vbox
- Timestamp:
- May 8, 2011 5:36:08 PM (14 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r37002 r37003 903 903 * Fetches the next opcode byte, returns automatically on failure. 904 904 * 905 * @param pIemCpu The IEM state.906 905 * @param a_pu8 Where to return the opcode byte. 907 */ 908 #define IEM_OPCODE_GET_NEXT_BYTE(a_pIemCpu, a_pu8) \ 906 * @remark Implicitly references pIemCpu. 907 */ 908 #define IEM_OPCODE_GET_NEXT_U8(a_pu8) \ 909 909 do \ 910 910 { \ 911 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextU8( (a_pIemCpu), (a_pu8)); \911 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextU8(pIemCpu, (a_pu8)); \ 912 912 if (rcStrict2 != VINF_SUCCESS) \ 913 913 return rcStrict2; \ … … 931 931 * on failure. 932 932 * 933 * @param pIemCpu The IEM state.934 933 * @param pi8 Where to return the signed byte. 935 */ 936 #define IEM_OPCODE_GET_NEXT_S8(a_pIemCpu, a_pi8) \ 934 * @remark Implicitly references pIemCpu. 935 */ 936 #define IEM_OPCODE_GET_NEXT_S8(a_pi8) \ 937 937 do \ 938 938 { \ 939 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextS8( (a_pIemCpu), (a_pi8)); \939 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextS8(pIemCpu, (a_pi8)); \ 940 940 if (rcStrict2 != VINF_SUCCESS) \ 941 941 return rcStrict2; \ … … 967 967 * a word, returning automatically on failure. 968 968 * 969 * @param pIemCpu The IEM state.970 969 * @param pu16 Where to return the word. 971 */ 972 #define IEM_OPCODE_GET_NEXT_S8_SX_U16(a_pIemCpu, a_pu16) \ 970 * @remark Implicitly references pIemCpu. 971 */ 972 #define IEM_OPCODE_GET_NEXT_S8_SX_U16(a_pu16) \ 973 973 do \ 974 974 { \ 975 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextS8SxU16( (a_pIemCpu), (a_pu16)); \975 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextS8SxU16(pIemCpu, (a_pu16)); \ 976 976 if (rcStrict2 != VINF_SUCCESS) \ 977 977 return rcStrict2; \ … … 1000 1000 * Fetches the next opcode word, returns automatically on failure. 1001 1001 * 1002 * @param pIemCpu The IEM state.1003 1002 * @param a_pu16 Where to return the opcode word. 1004 */ 1005 #define IEM_OPCODE_GET_NEXT_U16(a_pIemCpu, a_pu16) \ 1003 * @remark Implicitly references pIemCpu. 1004 */ 1005 #define IEM_OPCODE_GET_NEXT_U16(a_pu16) \ 1006 1006 do \ 1007 1007 { \ 1008 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextU16( (a_pIemCpu), (a_pu16)); \1008 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextU16(pIemCpu, (a_pu16)); \ 1009 1009 if (rcStrict2 != VINF_SUCCESS) \ 1010 1010 return rcStrict2; \ … … 1064 1064 * Fetches the next opcode dword, returns automatically on failure. 1065 1065 * 1066 * @param pIemCpu The IEM state.1067 1066 * @param a_u32 Where to return the opcode dword. 1068 */ 1069 #define IEM_OPCODE_GET_NEXT_U32(a_pIemCpu, a_pu32) \ 1067 * @remark Implicitly references pIemCpu. 1068 */ 1069 #define IEM_OPCODE_GET_NEXT_U32(a_pu32) \ 1070 1070 do \ 1071 1071 { \ 1072 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextU32( (a_pIemCpu), (a_pu32)); \1072 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextU32(pIemCpu, (a_pu32)); \ 1073 1073 if (rcStrict2 != VINF_SUCCESS) \ 1074 1074 return rcStrict2; \ … … 1130 1130 * returns automatically on failure. 1131 1131 * 1132 * @param pIemCpu The IEM state.1133 1132 * @param a_pu64 Where to return the opcode quad word. 1134 */ 1135 #define IEM_OPCODE_GET_NEXT_S32_SX_U64(a_pIemCpu, a_pu64) \ 1133 * @remark Implicitly references pIemCpu. 1134 */ 1135 #define IEM_OPCODE_GET_NEXT_S32_SX_U64(a_pu64) \ 1136 1136 do \ 1137 1137 { \ 1138 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextS32SxU64( (a_pIemCpu), (a_pu64)); \1138 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextS32SxU64(pIemCpu, (a_pu64)); \ 1139 1139 if (rcStrict2 != VINF_SUCCESS) \ 1140 1140 return rcStrict2; \ … … 1168 1168 1169 1169 /** 1170 * Fetches the next opcode word, returns automatically on failure.1171 * 1172 * @param pIemCpu The IEM state.1173 * @ param a_pu64 Where to return the opcode qword.1174 */ 1175 #define IEM_OPCODE_GET_NEXT_U64(a_p IemCpu, a_pu64) \1170 * Fetches the next opcode quad word, returns automatically on failure. 1171 * 1172 * @param a_pu64 Where to return the opcode quad word. 1173 * @remark Implicitly references pIemCpu. 1174 */ 1175 #define IEM_OPCODE_GET_NEXT_U64(a_pu64) \ 1176 1176 do \ 1177 1177 { \ 1178 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextU64( (a_pIemCpu), (a_pu64)); \1178 VBOXSTRICTRC rcStrict2 = iemOpcodeGetNextU64(pIemCpu, (a_pu64)); \ 1179 1179 if (rcStrict2 != VINF_SUCCESS) \ 1180 1180 return rcStrict2; \ … … 3722 3722 3723 3723 #define IEM_MC_ASSIGN(a_VarOrArg, a_CVariableOrConst) (a_VarOrArg) = (a_CVariableOrConst) 3724 #define IEM_MC_ASSIGN_TO_SMALLER IEM_MC_ASSIGN 3724 3725 3725 3726 #define IEM_MC_FETCH_GREG_U8(a_u8Dst, a_iGReg) (a_u8Dst) = iemGRegFetchU8(pIemCpu, (a_iGReg)) … … 3752 3753 #define IEM_MC_STORE_GREG_U32(a_iGReg, a_u32Value) *(uint64_t *)iemGRegRef(pIemCpu, (a_iGReg)) = (uint32_t)(a_u32Value) /* clear high bits. */ 3753 3754 #define IEM_MC_STORE_GREG_U64(a_iGReg, a_u64Value) *(uint64_t *)iemGRegRef(pIemCpu, (a_iGReg)) = (a_u64Value) 3755 #define IEM_MC_STORE_GREG_U8_CONST IEM_MC_STORE_GREG_U8 3756 #define IEM_MC_STORE_GREG_U16_CONST IEM_MC_STORE_GREG_U16 3757 #define IEM_MC_STORE_GREG_U32_CONST IEM_MC_STORE_GREG_U32 3758 #define IEM_MC_STORE_GREG_U64_CONST IEM_MC_STORE_GREG_U64 3754 3759 #define IEM_MC_CLEAR_HIGH_GREG_U64(a_iGReg) *(uint64_t *)iemGRegRef(pIemCpu, (a_iGReg)) &= UINT32_MAX 3755 3760 … … 4175 4180 /* Handle the disp16 form with no registers first. */ 4176 4181 if ((bRm & (X86_MODRM_MOD_MASK | X86_MODRM_RM_MASK)) == 6) 4177 IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16EffAddr);4182 IEM_OPCODE_GET_NEXT_U16(&u16EffAddr); 4178 4183 else 4179 4184 { … … 4181 4186 switch ((bRm >> X86_MODRM_MOD_SHIFT) & X86_MODRM_MOD_SMASK) 4182 4187 { 4183 case 0: u16EffAddr = 0; 4184 case 1: IEM_OPCODE_GET_NEXT_S8_SX_U16( pIemCpu, &u16EffAddr);break;4185 case 2: IEM_OPCODE_GET_NEXT_U16( pIemCpu, &u16EffAddr);break;4188 case 0: u16EffAddr = 0; break; 4189 case 1: IEM_OPCODE_GET_NEXT_S8_SX_U16(&u16EffAddr); break; 4190 case 2: IEM_OPCODE_GET_NEXT_U16(&u16EffAddr); break; 4186 4191 default: AssertFailedReturn(VERR_INTERNAL_ERROR_2); /* (caller checked for these) */ 4187 4192 } … … 4212 4217 /* Handle the disp32 form with no registers first. */ 4213 4218 if ((bRm & (X86_MODRM_MOD_MASK | X86_MODRM_RM_MASK)) == 5) 4214 IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32EffAddr);4219 IEM_OPCODE_GET_NEXT_U32(&u32EffAddr); 4215 4220 else 4216 4221 { … … 4224 4229 case 4: /* SIB */ 4225 4230 { 4226 uint8_t bSib; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bSib);4231 uint8_t bSib; IEM_OPCODE_GET_NEXT_U8(&bSib); 4227 4232 4228 4233 /* Get the index and scale it. */ … … 4258 4263 { 4259 4264 uint32_t u32Disp; 4260 IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Disp);4265 IEM_OPCODE_GET_NEXT_U32(&u32Disp); 4261 4266 u32EffAddr += u32Disp; 4262 4267 } … … 4281 4286 case 1: 4282 4287 { 4283 int8_t i8Disp; 4284 IEM_OPCODE_GET_NEXT_S8(pIemCpu, &i8Disp); 4288 int8_t i8Disp; IEM_OPCODE_GET_NEXT_S8(&i8Disp); 4285 4289 u32EffAddr += i8Disp; 4286 4290 break; … … 4288 4292 case 2: 4289 4293 { 4290 uint32_t u32Disp; 4291 IEM_OPCODE_GET_NEXT_U32(pIemCpu, &u32Disp); 4294 uint32_t u32Disp; IEM_OPCODE_GET_NEXT_U32(&u32Disp); 4292 4295 u32EffAddr += u32Disp; 4293 4296 break; … … 4316 4319 if ((bRm & (X86_MODRM_MOD_MASK | X86_MODRM_RM_MASK)) == 5) 4317 4320 { 4318 IEM_OPCODE_GET_NEXT_S32_SX_U64( pIemCpu,&u64EffAddr);4321 IEM_OPCODE_GET_NEXT_S32_SX_U64(&u64EffAddr); 4319 4322 u64EffAddr += pCtx->rip + pIemCpu->offOpcode; 4320 4323 } … … 4342 4345 case 12: 4343 4346 { 4344 uint8_t bSib; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bSib);4347 uint8_t bSib; IEM_OPCODE_GET_NEXT_U8(&bSib); 4345 4348 4346 4349 /* Get the index and scale it. */ … … 4399 4402 { 4400 4403 uint32_t u32Disp; 4401 IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Disp);4404 IEM_OPCODE_GET_NEXT_U32(&u32Disp); 4402 4405 u64EffAddr += (int32_t)u32Disp; 4403 4406 } … … 4417 4420 { 4418 4421 int8_t i8Disp; 4419 IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Disp);4422 IEM_OPCODE_GET_NEXT_S8(&i8Disp); 4420 4423 u64EffAddr += i8Disp; 4421 4424 break; … … 4424 4427 { 4425 4428 uint32_t u32Disp; 4426 IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Disp);4429 IEM_OPCODE_GET_NEXT_U32(&u32Disp); 4427 4430 u64EffAddr += (int32_t)u32Disp; 4428 4431 break; … … 5239 5242 return rcStrict; 5240 5243 5241 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);5244 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 5242 5245 rcStrict = FNIEMOP_CALL(g_apfnOneByteMap[b]); 5243 5246 if (rcStrict == VINF_SUCCESS) … … 5256 5259 if (rcStrict == VINF_SUCCESS) 5257 5260 { 5258 b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);5261 b; IEM_OPCODE_GET_NEXT_U8(&b); 5259 5262 rcStrict = FNIEMOP_CALL(g_apfnOneByteMap[b]); 5260 5263 if (rcStrict == VINF_SUCCESS) -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
r37002 r37003 31 31 FNIEMOP_DEF_1(iemOpHlpBinaryOperator_rm_r8, PCIEMOPBINSIZES, pImpl) 32 32 { 33 uint8_t bRm; 34 IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &bRm); 33 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 35 34 36 35 /* … … 94 93 FNIEMOP_DEF_1(iemOpHlpBinaryOperator_rm_rv, PCIEMOPBINSIZES, pImpl) 95 94 { 96 uint8_t bRm; 97 IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &bRm); 95 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 98 96 99 97 /* … … 241 239 FNIEMOP_DEF_1(iemOpHlpBinaryOperator_r8_rm, PCIEMOPBINSIZES, pImpl) 242 240 { 243 uint8_t bRm; 244 IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &bRm); 241 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 245 242 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 246 243 … … 295 292 FNIEMOP_DEF_1(iemOpHlpBinaryOperator_rv_rm, PCIEMOPBINSIZES, pImpl) 296 293 { 297 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);294 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 298 295 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 299 296 … … 422 419 FNIEMOP_DEF_1(iemOpHlpBinaryOperator_AL_Ib, PCIEMOPBINSIZES, pImpl) 423 420 { 424 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);421 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 425 422 IEMOP_HLP_NO_LOCK_PREFIX(); 426 423 … … 452 449 case IEMMODE_16BIT: 453 450 { 454 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);451 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 455 452 IEMOP_HLP_NO_LOCK_PREFIX(); 456 453 … … 471 468 case IEMMODE_32BIT: 472 469 { 473 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);470 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 474 471 IEMOP_HLP_NO_LOCK_PREFIX(); 475 472 … … 490 487 case IEMMODE_64BIT: 491 488 { 492 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64( pIemCpu,&u64Imm);489 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64(&u64Imm); 493 490 IEMOP_HLP_NO_LOCK_PREFIX(); 494 491 … … 607 604 FNIEMOP_DEF(iemOp_Grp6) 608 605 { 609 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);606 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 610 607 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) 611 608 { … … 844 841 FNIEMOP_DEF(iemOp_Grp7) 845 842 { 846 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);843 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 847 844 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) 848 845 { … … 971 968 /** @todo Verify that the the invalid lock sequence exception (\#UD) is raised 972 969 * before the privilege level violation (\#GP). */ 973 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);970 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 974 971 uint8_t iCrReg = ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pIemCpu->uRexReg; 975 972 if (pIemCpu->fPrefixes & IEM_OP_PRF_LOCK) … … 996 993 { 997 994 IEMOP_MNEMONIC("mov Rd,Dd"); 998 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);995 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 999 996 IEMOP_HLP_NO_LOCK_PREFIX(); 1000 997 if (pIemCpu->fPrefixes & IEM_OP_PRF_REX_R) … … 1018 1015 /** @todo Verify that the the invalid lock sequence exception (\#UD) is raised 1019 1016 * before the privilege level violation (\#GP). */ 1020 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);1017 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1021 1018 uint8_t iCrReg = ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pIemCpu->uRexReg; 1022 1019 if (pIemCpu->fPrefixes & IEM_OP_PRF_LOCK) … … 1043 1040 { 1044 1041 IEMOP_MNEMONIC("mov Dd,Rd"); 1045 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);1042 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1046 1043 IEMOP_HLP_NO_LOCK_PREFIX(); 1047 1044 if (pIemCpu->fPrefixes & IEM_OP_PRF_REX_R) … … 1126 1123 */ 1127 1124 #define CMOV_X(a_Cnd) \ 1128 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm); \1125 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); \ 1129 1126 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) \ 1130 1127 { \ … … 2007 2004 { 2008 2005 IEMOP_MNEMONIC("seto Eb"); 2009 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2006 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2010 2007 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2011 2008 … … 2018 2015 IEM_MC_BEGIN(0, 0); 2019 2016 IEM_MC_IF_EFL_BIT_SET(X86_EFL_OF) { 2020 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2017 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2021 2018 } IEM_MC_ELSE() { 2022 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2019 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2023 2020 } IEM_MC_ENDIF(); 2024 2021 IEM_MC_ADVANCE_RIP(); … … 2047 2044 { 2048 2045 IEMOP_MNEMONIC("setno Eb"); 2049 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2046 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2050 2047 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2051 2048 … … 2058 2055 IEM_MC_BEGIN(0, 0); 2059 2056 IEM_MC_IF_EFL_BIT_SET(X86_EFL_OF) { 2060 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2057 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2061 2058 } IEM_MC_ELSE() { 2062 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2059 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2063 2060 } IEM_MC_ENDIF(); 2064 2061 IEM_MC_ADVANCE_RIP(); … … 2087 2084 { 2088 2085 IEMOP_MNEMONIC("setc Eb"); 2089 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2086 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2090 2087 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2091 2088 … … 2098 2095 IEM_MC_BEGIN(0, 0); 2099 2096 IEM_MC_IF_EFL_BIT_SET(X86_EFL_CF) { 2100 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2097 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2101 2098 } IEM_MC_ELSE() { 2102 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2099 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2103 2100 } IEM_MC_ENDIF(); 2104 2101 IEM_MC_ADVANCE_RIP(); … … 2127 2124 { 2128 2125 IEMOP_MNEMONIC("setnc Eb"); 2129 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2126 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2130 2127 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2131 2128 … … 2138 2135 IEM_MC_BEGIN(0, 0); 2139 2136 IEM_MC_IF_EFL_BIT_SET(X86_EFL_CF) { 2140 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2137 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2141 2138 } IEM_MC_ELSE() { 2142 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2139 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2143 2140 } IEM_MC_ENDIF(); 2144 2141 IEM_MC_ADVANCE_RIP(); … … 2167 2164 { 2168 2165 IEMOP_MNEMONIC("sete Eb"); 2169 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2166 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2170 2167 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2171 2168 … … 2178 2175 IEM_MC_BEGIN(0, 0); 2179 2176 IEM_MC_IF_EFL_BIT_SET(X86_EFL_ZF) { 2180 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2177 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2181 2178 } IEM_MC_ELSE() { 2182 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2179 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2183 2180 } IEM_MC_ENDIF(); 2184 2181 IEM_MC_ADVANCE_RIP(); … … 2207 2204 { 2208 2205 IEMOP_MNEMONIC("setne Eb"); 2209 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2206 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2210 2207 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2211 2208 … … 2218 2215 IEM_MC_BEGIN(0, 0); 2219 2216 IEM_MC_IF_EFL_BIT_SET(X86_EFL_ZF) { 2220 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2217 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2221 2218 } IEM_MC_ELSE() { 2222 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2219 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2223 2220 } IEM_MC_ENDIF(); 2224 2221 IEM_MC_ADVANCE_RIP(); … … 2247 2244 { 2248 2245 IEMOP_MNEMONIC("setbe Eb"); 2249 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2246 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2250 2247 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2251 2248 … … 2258 2255 IEM_MC_BEGIN(0, 0); 2259 2256 IEM_MC_IF_EFL_ANY_BITS_SET(X86_EFL_CF | X86_EFL_ZF) { 2260 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2257 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2261 2258 } IEM_MC_ELSE() { 2262 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2259 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2263 2260 } IEM_MC_ENDIF(); 2264 2261 IEM_MC_ADVANCE_RIP(); … … 2287 2284 { 2288 2285 IEMOP_MNEMONIC("setnbe Eb"); 2289 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2286 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2290 2287 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2291 2288 … … 2298 2295 IEM_MC_BEGIN(0, 0); 2299 2296 IEM_MC_IF_EFL_ANY_BITS_SET(X86_EFL_CF | X86_EFL_ZF) { 2300 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2297 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2301 2298 } IEM_MC_ELSE() { 2302 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2299 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2303 2300 } IEM_MC_ENDIF(); 2304 2301 IEM_MC_ADVANCE_RIP(); … … 2327 2324 { 2328 2325 IEMOP_MNEMONIC("sets Eb"); 2329 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2326 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2330 2327 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2331 2328 … … 2338 2335 IEM_MC_BEGIN(0, 0); 2339 2336 IEM_MC_IF_EFL_BIT_SET(X86_EFL_SF) { 2340 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2337 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2341 2338 } IEM_MC_ELSE() { 2342 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2339 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2343 2340 } IEM_MC_ENDIF(); 2344 2341 IEM_MC_ADVANCE_RIP(); … … 2367 2364 { 2368 2365 IEMOP_MNEMONIC("setns Eb"); 2369 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2366 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2370 2367 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2371 2368 … … 2378 2375 IEM_MC_BEGIN(0, 0); 2379 2376 IEM_MC_IF_EFL_BIT_SET(X86_EFL_SF) { 2380 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2377 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2381 2378 } IEM_MC_ELSE() { 2382 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2379 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2383 2380 } IEM_MC_ENDIF(); 2384 2381 IEM_MC_ADVANCE_RIP(); … … 2407 2404 { 2408 2405 IEMOP_MNEMONIC("setnp Eb"); 2409 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2406 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2410 2407 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2411 2408 … … 2418 2415 IEM_MC_BEGIN(0, 0); 2419 2416 IEM_MC_IF_EFL_BIT_SET(X86_EFL_PF) { 2420 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2417 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2421 2418 } IEM_MC_ELSE() { 2422 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2419 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2423 2420 } IEM_MC_ENDIF(); 2424 2421 IEM_MC_ADVANCE_RIP(); … … 2447 2444 { 2448 2445 IEMOP_MNEMONIC("setnp Eb"); 2449 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2446 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2450 2447 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2451 2448 … … 2458 2455 IEM_MC_BEGIN(0, 0); 2459 2456 IEM_MC_IF_EFL_BIT_SET(X86_EFL_PF) { 2460 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2457 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2461 2458 } IEM_MC_ELSE() { 2462 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2459 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2463 2460 } IEM_MC_ENDIF(); 2464 2461 IEM_MC_ADVANCE_RIP(); … … 2487 2484 { 2488 2485 IEMOP_MNEMONIC("setl Eb"); 2489 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2486 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2490 2487 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2491 2488 … … 2498 2495 IEM_MC_BEGIN(0, 0); 2499 2496 IEM_MC_IF_EFL_BITS_NE(X86_EFL_SF, X86_EFL_OF) { 2500 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2497 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2501 2498 } IEM_MC_ELSE() { 2502 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2499 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2503 2500 } IEM_MC_ENDIF(); 2504 2501 IEM_MC_ADVANCE_RIP(); … … 2527 2524 { 2528 2525 IEMOP_MNEMONIC("setnl Eb"); 2529 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2526 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2530 2527 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2531 2528 … … 2538 2535 IEM_MC_BEGIN(0, 0); 2539 2536 IEM_MC_IF_EFL_BITS_NE(X86_EFL_SF, X86_EFL_OF) { 2540 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2537 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2541 2538 } IEM_MC_ELSE() { 2542 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2539 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2543 2540 } IEM_MC_ENDIF(); 2544 2541 IEM_MC_ADVANCE_RIP(); … … 2567 2564 { 2568 2565 IEMOP_MNEMONIC("setle Eb"); 2569 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2566 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2570 2567 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2571 2568 … … 2578 2575 IEM_MC_BEGIN(0, 0); 2579 2576 IEM_MC_IF_EFL_BIT_SET_OR_BITS_NE(X86_EFL_ZF, X86_EFL_SF, X86_EFL_OF) { 2580 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2577 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2581 2578 } IEM_MC_ELSE() { 2582 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2579 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2583 2580 } IEM_MC_ENDIF(); 2584 2581 IEM_MC_ADVANCE_RIP(); … … 2607 2604 { 2608 2605 IEMOP_MNEMONIC("setnle Eb"); 2609 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2606 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2610 2607 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo too early? */ 2611 2608 … … 2618 2615 IEM_MC_BEGIN(0, 0); 2619 2616 IEM_MC_IF_EFL_BIT_SET_OR_BITS_NE(X86_EFL_ZF, X86_EFL_SF, X86_EFL_OF) { 2620 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0);2617 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 0); 2621 2618 } IEM_MC_ELSE() { 2622 IEM_MC_STORE_GREG_U8 ((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1);2619 IEM_MC_STORE_GREG_U8_CONST((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, 1); 2623 2620 } IEM_MC_ENDIF(); 2624 2621 IEM_MC_ADVANCE_RIP(); … … 2720 2717 FNIEMOP_DEF_1(iemOpCommonBit_Ev_Gv, PCIEMOPBINSIZES, pImpl) 2721 2718 { 2722 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2719 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2723 2720 IEMOP_HLP_NO_LOCK_PREFIX(); 2724 2721 IEMOP_VERIFICATION_UNDEFINED_EFLAGS(X86_EFL_OF | X86_EFL_SF | X86_EFL_ZF | X86_EFL_AF | X86_EFL_PF); … … 2903 2900 FNIEMOP_DEF_1(iemOpCommonShldShrd_Ib, PCIEMOPSHIFTDBLSIZES, pImpl) 2904 2901 { 2905 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);2902 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2906 2903 IEMOP_HLP_NO_LOCK_PREFIX(); 2907 2904 IEMOP_VERIFICATION_UNDEFINED_EFLAGS(X86_EFL_AF | X86_EFL_OF); … … 2909 2906 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 2910 2907 { 2911 uint8_t cShift; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&cShift);2908 uint8_t cShift; IEM_OPCODE_GET_NEXT_U8(&cShift); 2912 2909 IEMOP_HLP_NO_LOCK_PREFIX(); 2913 2910 … … 2980 2977 2981 2978 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 2982 uint8_t cShift; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&cShift);2979 uint8_t cShift; IEM_OPCODE_GET_NEXT_U8(&cShift); 2983 2980 IEM_MC_ASSIGN(cShiftArg, cShift); 2984 2981 IEM_MC_FETCH_GREG_U16(u16Src, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pIemCpu->uRexReg); … … 3002 2999 3003 3000 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 3004 uint8_t cShift; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&cShift);3001 uint8_t cShift; IEM_OPCODE_GET_NEXT_U8(&cShift); 3005 3002 IEM_MC_ASSIGN(cShiftArg, cShift); 3006 3003 IEM_MC_FETCH_GREG_U32(u32Src, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pIemCpu->uRexReg); … … 3024 3021 3025 3022 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 3026 uint8_t cShift; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&cShift);3023 uint8_t cShift; IEM_OPCODE_GET_NEXT_U8(&cShift); 3027 3024 IEM_MC_ASSIGN(cShiftArg, cShift); 3028 3025 IEM_MC_FETCH_GREG_U64(u64Src, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pIemCpu->uRexReg); … … 3048 3045 FNIEMOP_DEF_1(iemOpCommonShldShrd_CL, PCIEMOPSHIFTDBLSIZES, pImpl) 3049 3046 { 3050 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);3047 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 3051 3048 IEMOP_HLP_NO_LOCK_PREFIX(); 3052 3049 IEMOP_VERIFICATION_UNDEFINED_EFLAGS(X86_EFL_AF | X86_EFL_OF); … … 3271 3268 FNIEMOP_DEF_1(iemOpCommonLoadSRegAndGreg, uint8_t, iSegReg) 3272 3269 { 3273 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);3270 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 3274 3271 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 3275 3272 … … 3368 3365 IEMOP_MNEMONIC("movzx Gv,Eb"); 3369 3366 3370 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);3367 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 3371 3368 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 3372 3369 … … 3459 3456 IEMOP_MNEMONIC("movzx Gv,Ew"); 3460 3457 3461 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);3458 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 3462 3459 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 3463 3460 … … 3530 3527 FNIEMOP_DEF(iemOp_Grp8) 3531 3528 { 3532 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);3529 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 3533 3530 PCIEMOPBINSIZES pImpl; 3534 3531 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) … … 3548 3545 { 3549 3546 /* register destination. */ 3550 uint8_t u8Bit; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Bit);3547 uint8_t u8Bit; IEM_OPCODE_GET_NEXT_U8(&u8Bit); 3551 3548 IEMOP_HLP_NO_LOCK_PREFIX(); 3552 3549 … … 3622 3619 3623 3620 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 3624 uint8_t u8Bit; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Bit);3621 uint8_t u8Bit; IEM_OPCODE_GET_NEXT_U8(&u8Bit); 3625 3622 IEM_MC_ASSIGN(u16Src, u8Bit & 0x0f); 3626 3623 IEM_MC_FETCH_EFLAGS(EFlags); … … 3645 3642 3646 3643 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 3647 uint8_t u8Bit; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Bit);3644 uint8_t u8Bit; IEM_OPCODE_GET_NEXT_U8(&u8Bit); 3648 3645 IEM_MC_ASSIGN(u32Src, u8Bit & 0x1f); 3649 3646 IEM_MC_FETCH_EFLAGS(EFlags); … … 3668 3665 3669 3666 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 3670 uint8_t u8Bit; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Bit);3667 uint8_t u8Bit; IEM_OPCODE_GET_NEXT_U8(&u8Bit); 3671 3668 IEM_MC_ASSIGN(u64Src, u8Bit & 0x3f); 3672 3669 IEM_MC_FETCH_EFLAGS(EFlags); … … 3721 3718 IEMOP_MNEMONIC("movsx Gv,Eb"); 3722 3719 3723 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);3720 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 3724 3721 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 3725 3722 … … 3812 3809 IEMOP_MNEMONIC("movsx Gv,Ew"); 3813 3810 3814 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);3811 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 3815 3812 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 3816 3813 … … 4296 4293 FNIEMOP_DEF(iemOp_2byteEscape) 4297 4294 { 4298 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4295 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4299 4296 return FNIEMOP_CALL(g_apfnTwoByteMap[b]); 4300 4297 } … … 4492 4489 pIemCpu->iEffSeg = X86_SREG_ES; 4493 4490 4494 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4491 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4495 4492 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4496 4493 } … … 4555 4552 pIemCpu->iEffSeg = X86_SREG_CS; 4556 4553 4557 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4554 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4558 4555 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4559 4556 } … … 4624 4621 pIemCpu->iEffSeg = X86_SREG_SS; 4625 4622 4626 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4623 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4627 4624 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4628 4625 } … … 4689 4686 pIemCpu->iEffSeg = X86_SREG_DS; 4690 4687 4691 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4688 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4692 4689 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4693 4690 } … … 4752 4749 pIemCpu->fPrefixes |= IEM_OP_PRF_REX; 4753 4750 4754 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4751 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4755 4752 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4756 4753 } … … 4772 4769 pIemCpu->uRexB = 1 << 3; 4773 4770 4774 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4771 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4775 4772 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4776 4773 } … … 4792 4789 pIemCpu->uRexIndex = 1 << 3; 4793 4790 4794 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4791 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4795 4792 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4796 4793 } … … 4814 4811 pIemCpu->uRexIndex = 1 << 3; 4815 4812 4816 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4813 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4817 4814 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4818 4815 } … … 4834 4831 pIemCpu->uRexReg = 1 << 3; 4835 4832 4836 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4833 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4837 4834 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4838 4835 } … … 4855 4852 pIemCpu->uRexB = 1 << 3; 4856 4853 4857 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4854 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4858 4855 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4859 4856 } … … 4876 4873 pIemCpu->uRexIndex = 1 << 3; 4877 4874 4878 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4875 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4879 4876 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4880 4877 } … … 4898 4895 pIemCpu->uRexIndex = 1 << 3; 4899 4896 4900 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4897 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4901 4898 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4902 4899 } … … 4918 4915 iemRecalEffOpSize(pIemCpu); 4919 4916 4920 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4917 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4921 4918 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4922 4919 } … … 4939 4936 iemRecalEffOpSize(pIemCpu); 4940 4937 4941 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4938 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4942 4939 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4943 4940 } … … 4960 4957 iemRecalEffOpSize(pIemCpu); 4961 4958 4962 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4959 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4963 4960 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4964 4961 } … … 4982 4979 iemRecalEffOpSize(pIemCpu); 4983 4980 4984 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);4981 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 4985 4982 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 4986 4983 } … … 5003 5000 iemRecalEffOpSize(pIemCpu); 5004 5001 5005 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);5002 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 5006 5003 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 5007 5004 } … … 5025 5022 iemRecalEffOpSize(pIemCpu); 5026 5023 5027 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);5024 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 5028 5025 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 5029 5026 } … … 5047 5044 iemRecalEffOpSize(pIemCpu); 5048 5045 5049 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);5046 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 5050 5047 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 5051 5048 } … … 5070 5067 iemRecalEffOpSize(pIemCpu); 5071 5068 5072 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);5069 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 5073 5070 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 5074 5071 } … … 5341 5338 pIemCpu->iEffSeg = X86_SREG_FS; 5342 5339 5343 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);5340 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 5344 5341 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 5345 5342 } … … 5352 5349 pIemCpu->iEffSeg = X86_SREG_GS; 5353 5350 5354 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);5351 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 5355 5352 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 5356 5353 } … … 5363 5360 iemRecalEffOpSize(pIemCpu); 5364 5361 5365 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);5362 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 5366 5363 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 5367 5364 } … … 5380 5377 } 5381 5378 5382 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);5379 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 5383 5380 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 5384 5381 } … … 5394 5391 case IEMMODE_16BIT: 5395 5392 { 5396 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);5393 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 5397 5394 IEMOP_HLP_NO_LOCK_PREFIX(); 5398 5395 IEM_MC_BEGIN(0,0); … … 5405 5402 case IEMMODE_32BIT: 5406 5403 { 5407 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);5404 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 5408 5405 IEMOP_HLP_NO_LOCK_PREFIX(); 5409 5406 IEM_MC_BEGIN(0,0); … … 5416 5413 case IEMMODE_64BIT: 5417 5414 { 5418 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64( pIemCpu,&u64Imm);5415 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64(&u64Imm); 5419 5416 IEMOP_HLP_NO_LOCK_PREFIX(); 5420 5417 IEM_MC_BEGIN(0,0); … … 5434 5431 { 5435 5432 IEMOP_MNEMONIC("imul Gv,Ev,Iz"); /* Gv = Ev * Iz; */ 5436 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);5433 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 5437 5434 IEMOP_VERIFICATION_UNDEFINED_EFLAGS(X86_EFL_SF | X86_EFL_ZF | X86_EFL_AF | X86_EFL_PF); 5438 5435 … … 5441 5438 case IEMMODE_16BIT: 5442 5439 { 5443 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);5440 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 5444 5441 IEMOP_HLP_NO_LOCK_PREFIX(); 5445 5442 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) … … 5486 5483 case IEMMODE_32BIT: 5487 5484 { 5488 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);5485 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 5489 5486 IEMOP_HLP_NO_LOCK_PREFIX(); 5490 5487 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) … … 5531 5528 case IEMMODE_64BIT: 5532 5529 { 5533 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64( pIemCpu,&u64Imm);5530 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64(&u64Imm); 5534 5531 IEMOP_HLP_NO_LOCK_PREFIX(); 5535 5532 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) … … 5582 5579 { 5583 5580 IEMOP_MNEMONIC("push Ib"); 5584 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);5581 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 5585 5582 IEMOP_HLP_NO_LOCK_PREFIX(); 5586 5583 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 5609 5606 { 5610 5607 IEMOP_MNEMONIC("imul Gv,Ev,Ib"); /* Gv = Ev * Iz; */ 5611 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);5612 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);5608 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 5609 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 5613 5610 IEMOP_HLP_NO_LOCK_PREFIX(); 5614 5611 IEMOP_VERIFICATION_UNDEFINED_EFLAGS(X86_EFL_SF | X86_EFL_ZF | X86_EFL_AF | X86_EFL_PF); … … 5927 5924 { 5928 5925 IEMOP_MNEMONIC("jo Jb"); 5929 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);5926 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 5930 5927 IEMOP_HLP_NO_LOCK_PREFIX(); 5931 5928 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 5946 5943 { 5947 5944 IEMOP_MNEMONIC("jno Jb"); 5948 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);5945 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 5949 5946 IEMOP_HLP_NO_LOCK_PREFIX(); 5950 5947 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 5964 5961 { 5965 5962 IEMOP_MNEMONIC("jc/jnae Jb"); 5966 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);5963 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 5967 5964 IEMOP_HLP_NO_LOCK_PREFIX(); 5968 5965 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 5983 5980 { 5984 5981 IEMOP_MNEMONIC("jnc/jnb Jb"); 5985 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);5982 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 5986 5983 IEMOP_HLP_NO_LOCK_PREFIX(); 5987 5984 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6002 5999 { 6003 6000 IEMOP_MNEMONIC("je/jz Jb"); 6004 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6001 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6005 6002 IEMOP_HLP_NO_LOCK_PREFIX(); 6006 6003 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6021 6018 { 6022 6019 IEMOP_MNEMONIC("jne/jnz Jb"); 6023 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6020 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6024 6021 IEMOP_HLP_NO_LOCK_PREFIX(); 6025 6022 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6040 6037 { 6041 6038 IEMOP_MNEMONIC("jbe/jna Jb"); 6042 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6039 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6043 6040 IEMOP_HLP_NO_LOCK_PREFIX(); 6044 6041 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6059 6056 { 6060 6057 IEMOP_MNEMONIC("jnbe/ja Jb"); 6061 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6058 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6062 6059 IEMOP_HLP_NO_LOCK_PREFIX(); 6063 6060 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6078 6075 { 6079 6076 IEMOP_MNEMONIC("js Jb"); 6080 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6077 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6081 6078 IEMOP_HLP_NO_LOCK_PREFIX(); 6082 6079 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6097 6094 { 6098 6095 IEMOP_MNEMONIC("jns Jb"); 6099 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6096 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6100 6097 IEMOP_HLP_NO_LOCK_PREFIX(); 6101 6098 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6116 6113 { 6117 6114 IEMOP_MNEMONIC("jp Jb"); 6118 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6115 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6119 6116 IEMOP_HLP_NO_LOCK_PREFIX(); 6120 6117 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6135 6132 { 6136 6133 IEMOP_MNEMONIC("jnp Jb"); 6137 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6134 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6138 6135 IEMOP_HLP_NO_LOCK_PREFIX(); 6139 6136 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6154 6151 { 6155 6152 IEMOP_MNEMONIC("jl/jnge Jb"); 6156 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6153 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6157 6154 IEMOP_HLP_NO_LOCK_PREFIX(); 6158 6155 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6173 6170 { 6174 6171 IEMOP_MNEMONIC("jnl/jge Jb"); 6175 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6172 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6176 6173 IEMOP_HLP_NO_LOCK_PREFIX(); 6177 6174 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6192 6189 { 6193 6190 IEMOP_MNEMONIC("jle/jng Jb"); 6194 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6191 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6195 6192 IEMOP_HLP_NO_LOCK_PREFIX(); 6196 6193 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6211 6208 { 6212 6209 IEMOP_MNEMONIC("jnle/jg Jb"); 6213 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);6210 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 6214 6211 IEMOP_HLP_NO_LOCK_PREFIX(); 6215 6212 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 6229 6226 FNIEMOP_DEF(iemOp_Grp1_Eb_Ib_80) 6230 6227 { 6231 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);6228 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 6232 6229 IEMOP_MNEMONIC2("add\0or\0\0adc\0sbb\0and\0sub\0xor\0cmp" + ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK)*4, "Eb,Ib"); 6233 6230 PCIEMOPBINSIZES pImpl = g_apIemImplGrp1[(bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK]; … … 6236 6233 { 6237 6234 /* register target */ 6238 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);6235 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 6239 6236 IEMOP_HLP_NO_LOCK_PREFIX(); 6240 6237 IEM_MC_BEGIN(3, 0); … … 6267 6264 6268 6265 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 6269 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);6266 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 6270 6267 IEM_MC_ARG_CONST(uint8_t, u8Src, /*=*/ u8Imm, 1); 6271 6268 … … 6289 6286 FNIEMOP_DEF(iemOp_Grp1_Ev_Iz) 6290 6287 { 6291 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);6288 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 6292 6289 IEMOP_MNEMONIC2("add\0or\0\0adc\0sbb\0and\0sub\0xor\0cmp" + ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK)*4, "Ev,Iz"); 6293 6290 PCIEMOPBINSIZES pImpl = g_apIemImplGrp1[(bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK]; … … 6300 6297 { 6301 6298 /* register target */ 6302 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);6299 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 6303 6300 IEMOP_HLP_NO_LOCK_PREFIX(); 6304 6301 IEM_MC_BEGIN(3, 0); … … 6332 6329 6333 6330 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 6334 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);6331 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 6335 6332 IEM_MC_ASSIGN(u16Src, u16Imm); 6336 6333 IEM_MC_MEM_MAP(pu16Dst, fAccess, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 6354 6351 { 6355 6352 /* register target */ 6356 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);6353 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 6357 6354 IEMOP_HLP_NO_LOCK_PREFIX(); 6358 6355 IEM_MC_BEGIN(3, 0); … … 6386 6383 6387 6384 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 6388 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);6385 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 6389 6386 IEM_MC_ASSIGN(u32Src, u32Imm); 6390 6387 IEM_MC_MEM_MAP(pu32Dst, fAccess, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 6408 6405 { 6409 6406 /* register target */ 6410 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64( pIemCpu,&u64Imm);6407 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64(&u64Imm); 6411 6408 IEMOP_HLP_NO_LOCK_PREFIX(); 6412 6409 IEM_MC_BEGIN(3, 0); … … 6440 6437 6441 6438 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 6442 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64( pIemCpu,&u64Imm);6439 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64(&u64Imm); 6443 6440 IEM_MC_ASSIGN(u64Src, u64Imm); 6444 6441 IEM_MC_MEM_MAP(pu64Dst, fAccess, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 6472 6469 FNIEMOP_DEF(iemOp_Grp1_Ev_Ib) 6473 6470 { 6474 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);6471 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 6475 6472 IEMOP_MNEMONIC2("add\0or\0\0adc\0sbb\0and\0sub\0xor\0cmp" + ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK)*4, "Ev,Ib"); 6476 6473 PCIEMOPBINSIZES pImpl = g_apIemImplGrp1[(bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK]; … … 6482 6479 */ 6483 6480 IEMOP_HLP_NO_LOCK_PREFIX(); 6484 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);6481 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 6485 6482 switch (pIemCpu->enmEffOpSize) 6486 6483 { … … 6559 6556 6560 6557 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 6561 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);6558 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 6562 6559 IEM_MC_ASSIGN(u16Src, (int8_t)u8Imm); 6563 6560 IEM_MC_MEM_MAP(pu16Dst, fAccess, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 6584 6581 6585 6582 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 6586 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);6583 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 6587 6584 IEM_MC_ASSIGN(u32Src, (int8_t)u8Imm); 6588 6585 IEM_MC_MEM_MAP(pu32Dst, fAccess, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 6609 6606 6610 6607 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 6611 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);6608 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 6612 6609 IEM_MC_ASSIGN(u64Src, (int8_t)u8Imm); 6613 6610 IEM_MC_MEM_MAP(pu64Dst, fAccess, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 6653 6650 FNIEMOP_DEF(iemOp_xchg_Eb_Gb) 6654 6651 { 6655 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);6652 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 6656 6653 IEMOP_MNEMONIC("xchg Eb,Gb"); 6657 6654 … … 6702 6699 { 6703 6700 IEMOP_MNEMONIC("xchg Ev,Gv"); 6704 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);6701 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 6705 6702 6706 6703 /* … … 6825 6822 6826 6823 uint8_t bRm; 6827 IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);6824 IEM_OPCODE_GET_NEXT_U8(&bRm); 6828 6825 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 6829 6826 … … 6864 6861 IEMOP_MNEMONIC("mov Ev,Gv"); 6865 6862 6866 uint8_t bRm; 6867 IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &bRm); 6863 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 6868 6864 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 6869 6865 … … 6953 6949 IEMOP_MNEMONIC("mov Gb,Eb"); 6954 6950 6955 uint8_t bRm; 6956 IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &bRm); 6951 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 6957 6952 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 6958 6953 … … 6992 6987 IEMOP_MNEMONIC("mov Gv,Ev"); 6993 6988 6994 uint8_t bRm; 6995 IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &bRm); 6989 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 6996 6990 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 6997 6991 … … 7081 7075 IEMOP_MNEMONIC("mov Ev,Sw"); 7082 7076 7083 uint8_t bRm; 7084 IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &bRm); 7077 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 7085 7078 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 7086 7079 … … 7157 7150 { 7158 7151 IEMOP_MNEMONIC("lea Gv,M"); 7159 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);7152 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 7160 7153 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 7161 7154 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) … … 7165 7158 { 7166 7159 case IEMMODE_16BIT: 7167 IEM_MC_BEGIN(0, 1); 7168 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 7160 IEM_MC_BEGIN(0, 2); 7161 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 7162 IEM_MC_LOCAL(uint16_t, u16Cast); 7169 7163 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm); 7170 IEM_MC_STORE_GREG_U16(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pIemCpu->uRexReg, GCPtrEffSrc); 7164 IEM_MC_ASSIGN_TO_SMALLER(u16Cast, GCPtrEffSrc); 7165 IEM_MC_STORE_GREG_U16(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pIemCpu->uRexReg, u16Cast); 7171 7166 IEM_MC_ADVANCE_RIP(); 7172 7167 IEM_MC_END(); … … 7174 7169 7175 7170 case IEMMODE_32BIT: 7176 IEM_MC_BEGIN(0, 1);7171 IEM_MC_BEGIN(0, 2); 7177 7172 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 7173 IEM_MC_LOCAL(uint32_t, u32Cast); 7178 7174 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm); 7179 IEM_MC_STORE_GREG_U32(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pIemCpu->uRexReg, GCPtrEffSrc); 7175 IEM_MC_ASSIGN_TO_SMALLER(u32Cast, GCPtrEffSrc); 7176 IEM_MC_STORE_GREG_U32(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pIemCpu->uRexReg, u32Cast); 7180 7177 IEM_MC_ADVANCE_RIP(); 7181 7178 IEM_MC_END(); … … 7200 7197 IEMOP_MNEMONIC("mov Sw,Ev"); 7201 7198 7202 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);7199 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 7203 7200 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 7204 7201 … … 7264 7261 * now until tests show it's checked.. */ 7265 7262 IEMOP_MNEMONIC("pop Ev"); 7266 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);7263 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 7267 7264 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 7268 7265 … … 7496 7493 IEM_MC_BEGIN(0, 1); 7497 7494 IEM_MC_IF_GREG_BIT_SET(X86_GREG_xAX, 15) { 7498 IEM_MC_STORE_GREG_U16 (X86_GREG_xDX, UINT16_C(0xffff));7495 IEM_MC_STORE_GREG_U16_CONST(X86_GREG_xDX, UINT16_C(0xffff)); 7499 7496 } IEM_MC_ELSE() { 7500 IEM_MC_STORE_GREG_U16 (X86_GREG_xDX, 0);7497 IEM_MC_STORE_GREG_U16_CONST(X86_GREG_xDX, 0); 7501 7498 } IEM_MC_ENDIF(); 7502 7499 IEM_MC_ADVANCE_RIP(); … … 7508 7505 IEM_MC_BEGIN(0, 1); 7509 7506 IEM_MC_IF_GREG_BIT_SET(X86_GREG_xAX, 31) { 7510 IEM_MC_STORE_GREG_U32 (X86_GREG_xDX, UINT32_C(0xffffffff));7507 IEM_MC_STORE_GREG_U32_CONST(X86_GREG_xDX, UINT32_C(0xffffffff)); 7511 7508 } IEM_MC_ELSE() { 7512 IEM_MC_STORE_GREG_U32 (X86_GREG_xDX, 0);7509 IEM_MC_STORE_GREG_U32_CONST(X86_GREG_xDX, 0); 7513 7510 } IEM_MC_ENDIF(); 7514 7511 IEM_MC_ADVANCE_RIP(); … … 7520 7517 IEM_MC_BEGIN(0, 1); 7521 7518 IEM_MC_IF_GREG_BIT_SET(X86_GREG_xAX, 63) { 7522 IEM_MC_STORE_GREG_U64 (X86_GREG_xDX, UINT64_C(0xffffffffffffffff));7519 IEM_MC_STORE_GREG_U64_CONST(X86_GREG_xDX, UINT64_C(0xffffffffffffffff)); 7523 7520 } IEM_MC_ELSE() { 7524 IEM_MC_STORE_GREG_U64 (X86_GREG_xDX, 0);7521 IEM_MC_STORE_GREG_U64_CONST(X86_GREG_xDX, 0); 7525 7522 } IEM_MC_ENDIF(); 7526 7523 IEM_MC_ADVANCE_RIP(); … … 7588 7585 case IEMMODE_16BIT: \ 7589 7586 { \ 7590 uint16_t u16Off; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Off); \7587 uint16_t u16Off; IEM_OPCODE_GET_NEXT_U16(&u16Off); \ 7591 7588 (a_GCPtrMemOff) = u16Off; \ 7592 7589 break; \ … … 7594 7591 case IEMMODE_32BIT: \ 7595 7592 { \ 7596 uint32_t u32Off; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Off); \7593 uint32_t u32Off; IEM_OPCODE_GET_NEXT_U32(&u32Off); \ 7597 7594 (a_GCPtrMemOff) = u32Off; \ 7598 7595 break; \ 7599 7596 } \ 7600 7597 case IEMMODE_64BIT: \ 7601 IEM_OPCODE_GET_NEXT_U64( pIemCpu,&(a_GCPtrMemOff)); \7598 IEM_OPCODE_GET_NEXT_U64(&(a_GCPtrMemOff)); \ 7602 7599 break; \ 7603 7600 IEM_NOT_REACHED_DEFAULT_CASE_RET(); \ … … 8557 8554 FNIEMOP_DEF_1(iemOpCommonMov_r8_Ib, uint8_t, iReg) 8558 8555 { 8559 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);8556 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 8560 8557 IEMOP_HLP_NO_LOCK_PREFIX(); 8561 8558 … … 8643 8640 case IEMMODE_16BIT: 8644 8641 { 8645 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);8642 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 8646 8643 IEMOP_HLP_NO_LOCK_PREFIX(); 8647 8644 … … 8656 8653 case IEMMODE_32BIT: 8657 8654 { 8658 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);8655 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 8659 8656 IEMOP_HLP_NO_LOCK_PREFIX(); 8660 8657 … … 8668 8665 case IEMMODE_64BIT: 8669 8666 { 8670 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_U64( pIemCpu,&u64Imm);8667 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_U64(&u64Imm); 8671 8668 IEMOP_HLP_NO_LOCK_PREFIX(); 8672 8669 … … 8751 8748 FNIEMOP_DEF(iemOp_Grp2_Eb_Ib) 8752 8749 { 8753 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);8750 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 8754 8751 PCIEMOPSHIFTSIZES pImpl; 8755 8752 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) … … 8770 8767 { 8771 8768 /* register */ 8772 uint8_t cShift; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&cShift);8769 uint8_t cShift; IEM_OPCODE_GET_NEXT_U8(&cShift); 8773 8770 IEMOP_HLP_NO_LOCK_PREFIX(); 8774 8771 IEM_MC_BEGIN(3, 0); … … 8793 8790 8794 8791 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 8795 uint8_t cShift; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&cShift);8792 uint8_t cShift; IEM_OPCODE_GET_NEXT_U8(&cShift); 8796 8793 IEM_MC_ASSIGN(cShiftArg, cShift); 8797 8794 IEM_MC_MEM_MAP(pu8Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 8811 8808 FNIEMOP_DEF(iemOp_Grp2_Ev_Ib) 8812 8809 { 8813 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);8810 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 8814 8811 PCIEMOPSHIFTSIZES pImpl; 8815 8812 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) … … 8830 8827 { 8831 8828 /* register */ 8832 uint8_t cShift; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&cShift);8829 uint8_t cShift; IEM_OPCODE_GET_NEXT_U8(&cShift); 8833 8830 IEMOP_HLP_NO_LOCK_PREFIX(); 8834 8831 switch (pIemCpu->enmEffOpSize) … … 8887 8884 8888 8885 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 8889 uint8_t cShift; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&cShift);8886 uint8_t cShift; IEM_OPCODE_GET_NEXT_U8(&cShift); 8890 8887 IEM_MC_ASSIGN(cShiftArg, cShift); 8891 8888 IEM_MC_MEM_MAP(pu16Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 8907 8904 8908 8905 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 8909 uint8_t cShift; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&cShift);8906 uint8_t cShift; IEM_OPCODE_GET_NEXT_U8(&cShift); 8910 8907 IEM_MC_ASSIGN(cShiftArg, cShift); 8911 8908 IEM_MC_MEM_MAP(pu32Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 8927 8924 8928 8925 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 8929 uint8_t cShift; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&cShift);8926 uint8_t cShift; IEM_OPCODE_GET_NEXT_U8(&cShift); 8930 8927 IEM_MC_ASSIGN(cShiftArg, cShift); 8931 8928 IEM_MC_MEM_MAP(pu64Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 8949 8946 { 8950 8947 IEMOP_MNEMONIC("retn Iw"); 8951 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);8948 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 8952 8949 IEMOP_HLP_NO_LOCK_PREFIX(); 8953 8950 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 8985 8982 FNIEMOP_DEF(iemOp_Grp11_Eb_Ib) 8986 8983 { 8987 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);8984 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 8988 8985 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 8989 8986 if ((bRm & X86_MODRM_REG_MASK) != (0 << X86_MODRM_REG_SHIFT)) /* only mov Eb,Ib in this group. */ … … 8994 8991 { 8995 8992 /* register access */ 8996 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);8993 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 8997 8994 IEM_MC_BEGIN(0, 0); 8998 8995 IEM_MC_STORE_GREG_U8((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, u8Imm); … … 9006 9003 IEM_MC_LOCAL(RTGCPTR, GCPtrEffDst); 9007 9004 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 9008 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);9005 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 9009 9006 IEM_MC_STORE_MEM_U8(pIemCpu->iEffSeg, GCPtrEffDst, u8Imm); 9010 9007 IEM_MC_ADVANCE_RIP(); … … 9018 9015 FNIEMOP_DEF(iemOp_Grp11_Ev_Iz) 9019 9016 { 9020 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);9017 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 9021 9018 IEMOP_HLP_NO_LOCK_PREFIX(); /** @todo should probably not be raised until we've fetched all the opcode bytes? */ 9022 9019 if ((bRm & X86_MODRM_REG_MASK) != (0 << X86_MODRM_REG_SHIFT)) /* only mov Eb,Ib in this group. */ … … 9031 9028 case IEMMODE_16BIT: 9032 9029 IEM_MC_BEGIN(0, 0); 9033 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);9030 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 9034 9031 IEM_MC_STORE_GREG_U16((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, u16Imm); 9035 9032 IEM_MC_ADVANCE_RIP(); … … 9039 9036 case IEMMODE_32BIT: 9040 9037 IEM_MC_BEGIN(0, 0); 9041 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);9038 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 9042 9039 IEM_MC_STORE_GREG_U32((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, u32Imm); 9043 9040 IEM_MC_ADVANCE_RIP(); … … 9047 9044 case IEMMODE_64BIT: 9048 9045 IEM_MC_BEGIN(0, 0); 9049 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_U64( pIemCpu,&u64Imm);9046 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_U64(&u64Imm); 9050 9047 IEM_MC_STORE_GREG_U64((bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB, u64Imm); 9051 9048 IEM_MC_ADVANCE_RIP(); … … 9065 9062 IEM_MC_LOCAL(RTGCPTR, GCPtrEffDst); 9066 9063 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 9067 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);9064 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 9068 9065 IEM_MC_STORE_MEM_U16(pIemCpu->iEffSeg, GCPtrEffDst, u16Imm); 9069 9066 IEM_MC_ADVANCE_RIP(); … … 9075 9072 IEM_MC_LOCAL(RTGCPTR, GCPtrEffDst); 9076 9073 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 9077 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);9074 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 9078 9075 IEM_MC_STORE_MEM_U32(pIemCpu->iEffSeg, GCPtrEffDst, u32Imm); 9079 9076 IEM_MC_ADVANCE_RIP(); … … 9085 9082 IEM_MC_LOCAL(RTGCPTR, GCPtrEffDst); 9086 9083 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 9087 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_U64( pIemCpu,&u64Imm);9084 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_U64(&u64Imm); 9088 9085 IEM_MC_STORE_MEM_U64(pIemCpu->iEffSeg, GCPtrEffDst, u64Imm); 9089 9086 IEM_MC_ADVANCE_RIP(); … … 9117 9114 { 9118 9115 IEMOP_MNEMONIC("retf Iw"); 9119 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);9116 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 9120 9117 IEMOP_HLP_NO_LOCK_PREFIX(); 9121 9118 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 9144 9141 FNIEMOP_DEF(iemOp_int_Ib) 9145 9142 { 9146 uint8_t u8Int; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Int);9143 uint8_t u8Int; IEM_OPCODE_GET_NEXT_U8(&u8Int); 9147 9144 return IEM_MC_DEFER_TO_CIMPL_2(iemCImpl_int, u8Int, false /*fIsBpInstr*/); 9148 9145 } … … 9173 9170 FNIEMOP_DEF(iemOp_Grp2_Eb_1) 9174 9171 { 9175 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);9172 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 9176 9173 PCIEMOPSHIFTSIZES pImpl; 9177 9174 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) … … 9231 9228 FNIEMOP_DEF(iemOp_Grp2_Ev_1) 9232 9229 { 9233 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);9230 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 9234 9231 PCIEMOPSHIFTSIZES pImpl; 9235 9232 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) … … 9361 9358 FNIEMOP_DEF(iemOp_Grp2_Eb_CL) 9362 9359 { 9363 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);9360 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 9364 9361 PCIEMOPSHIFTSIZES pImpl; 9365 9362 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) … … 9420 9417 FNIEMOP_DEF(iemOp_Grp2_Ev_CL) 9421 9418 { 9422 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);9419 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 9423 9420 PCIEMOPSHIFTSIZES pImpl; 9424 9421 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) … … 9687 9684 FNIEMOP_DEF(iemOp_EscF3) 9688 9685 { 9689 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);9686 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 9690 9687 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 9691 9688 { … … 9743 9740 FNIEMOP_DEF(iemOp_EscF6) 9744 9741 { 9745 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);9742 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 9746 9743 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 9747 9744 { … … 9805 9802 FNIEMOP_DEF(iemOp_EscF7) 9806 9803 { 9807 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);9804 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 9808 9805 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 9809 9806 { … … 9837 9834 { 9838 9835 IEMOP_MNEMONIC("loopne Jb"); 9839 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);9836 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 9840 9837 IEMOP_HLP_NO_LOCK_PREFIX(); 9841 9838 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 9885 9882 { 9886 9883 IEMOP_MNEMONIC("loope Jb"); 9887 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);9884 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 9888 9885 IEMOP_HLP_NO_LOCK_PREFIX(); 9889 9886 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 9933 9930 { 9934 9931 IEMOP_MNEMONIC("loop Jb"); 9935 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);9932 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 9936 9933 IEMOP_HLP_NO_LOCK_PREFIX(); 9937 9934 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 9984 9981 { 9985 9982 IEMOP_MNEMONIC("jecxz Jb"); 9986 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);9983 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 9987 9984 IEMOP_HLP_NO_LOCK_PREFIX(); 9988 9985 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 10029 10026 { 10030 10027 IEMOP_MNEMONIC("in eAX,Ib"); 10031 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);10028 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 10032 10029 IEMOP_HLP_NO_LOCK_PREFIX(); 10033 10030 return IEM_MC_DEFER_TO_CIMPL_2(iemCImpl_in, u8Imm, 1); … … 10039 10036 { 10040 10037 IEMOP_MNEMONIC("in eAX,Ib"); 10041 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);10038 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 10042 10039 IEMOP_HLP_NO_LOCK_PREFIX(); 10043 10040 return IEM_MC_DEFER_TO_CIMPL_2(iemCImpl_in, u8Imm, pIemCpu->enmEffOpSize == IEMMODE_16BIT ? 2 : 4); … … 10049 10046 { 10050 10047 IEMOP_MNEMONIC("out Ib,AL"); 10051 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);10048 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 10052 10049 IEMOP_HLP_NO_LOCK_PREFIX(); 10053 10050 return IEM_MC_DEFER_TO_CIMPL_2(iemCImpl_out, u8Imm, 1); … … 10059 10056 { 10060 10057 IEMOP_MNEMONIC("out Ib,eAX"); 10061 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);10058 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 10062 10059 IEMOP_HLP_NO_LOCK_PREFIX(); 10063 10060 return IEM_MC_DEFER_TO_CIMPL_2(iemCImpl_out, u8Imm, pIemCpu->enmEffOpSize == IEMMODE_16BIT ? 2 : 4); … … 10074 10071 case IEMMODE_16BIT: 10075 10072 { 10076 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);10073 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 10077 10074 return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_call_rel_16, (int32_t)u16Imm); 10078 10075 } … … 10080 10077 case IEMMODE_32BIT: 10081 10078 { 10082 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);10079 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 10083 10080 return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_call_rel_32, (int32_t)u32Imm); 10084 10081 } … … 10086 10083 case IEMMODE_64BIT: 10087 10084 { 10088 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64( pIemCpu,&u64Imm);10085 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64(&u64Imm); 10089 10086 return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_call_rel_64, u64Imm); 10090 10087 } … … 10135 10132 uint32_t offSeg; 10136 10133 if (pIemCpu->enmEffOpSize != IEMMODE_16BIT) 10137 IEM_OPCODE_GET_NEXT_U32( pIemCpu,&offSeg);10134 IEM_OPCODE_GET_NEXT_U32(&offSeg); 10138 10135 else 10139 10136 { 10140 uint16_t offSeg16; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&offSeg16);10137 uint16_t offSeg16; IEM_OPCODE_GET_NEXT_U16(&offSeg16); 10141 10138 offSeg = offSeg16; 10142 10139 } 10143 uint16_t uSel; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&uSel);10140 uint16_t uSel; IEM_OPCODE_GET_NEXT_U16(&uSel); 10144 10141 IEMOP_HLP_NO_LOCK_PREFIX(); 10145 10142 return IEM_MC_DEFER_TO_CIMPL_3(iemCImpl_FarJmp, uSel, offSeg, pIemCpu->enmEffOpSize); … … 10151 10148 { 10152 10149 IEMOP_MNEMONIC("jmp Jb"); 10153 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8( pIemCpu,&i8Imm);10150 int8_t i8Imm; IEM_OPCODE_GET_NEXT_S8(&i8Imm); 10154 10151 IEMOP_HLP_NO_LOCK_PREFIX(); 10155 10152 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); … … 10203 10200 pIemCpu->fPrefixes |= IEM_OP_PRF_LOCK; 10204 10201 10205 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);10202 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 10206 10203 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 10207 10204 } … … 10215 10212 pIemCpu->fPrefixes |= IEM_OP_PRF_REPNZ; 10216 10213 10217 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);10214 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 10218 10215 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 10219 10216 } … … 10227 10224 pIemCpu->fPrefixes |= IEM_OP_PRF_REPZ; 10228 10225 10229 uint8_t b; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&b);10226 uint8_t b; IEM_OPCODE_GET_NEXT_U8(&b); 10230 10227 return FNIEMOP_CALL(g_apfnOneByteMap[b]); 10231 10228 } … … 10378 10375 { 10379 10376 /* register access */ 10380 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);10377 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 10381 10378 IEMOP_HLP_NO_LOCK_PREFIX(); 10382 10379 … … 10403 10400 10404 10401 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 10405 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&u8Imm);10402 uint8_t u8Imm; IEM_OPCODE_GET_NEXT_U8(&u8Imm); 10406 10403 IEM_MC_ASSIGN(u8Src, u8Imm); 10407 10404 IEM_MC_MEM_MAP(pu8Dst, IEM_ACCESS_DATA_R, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 10432 10429 case IEMMODE_16BIT: 10433 10430 { 10434 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);10431 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 10435 10432 IEM_MC_BEGIN(3, 0); 10436 10433 IEM_MC_ARG(uint16_t *, pu16Dst, 0); … … 10447 10444 case IEMMODE_32BIT: 10448 10445 { 10449 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);10446 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 10450 10447 IEM_MC_BEGIN(3, 0); 10451 10448 IEM_MC_ARG(uint32_t *, pu32Dst, 0); … … 10462 10459 case IEMMODE_64BIT: 10463 10460 { 10464 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64( pIemCpu,&u64Imm);10461 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64(&u64Imm); 10465 10462 IEM_MC_BEGIN(3, 0); 10466 10463 IEM_MC_ARG(uint64_t *, pu64Dst, 0); … … 10492 10489 10493 10490 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 10494 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16( pIemCpu,&u16Imm);10491 uint16_t u16Imm; IEM_OPCODE_GET_NEXT_U16(&u16Imm); 10495 10492 IEM_MC_ASSIGN(u16Src, u16Imm); 10496 10493 IEM_MC_MEM_MAP(pu16Dst, IEM_ACCESS_DATA_R, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 10514 10511 10515 10512 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 10516 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32( pIemCpu,&u32Imm);10513 uint32_t u32Imm; IEM_OPCODE_GET_NEXT_U32(&u32Imm); 10517 10514 IEM_MC_ASSIGN(u32Src, u32Imm); 10518 10515 IEM_MC_MEM_MAP(pu32Dst, IEM_ACCESS_DATA_R, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 10536 10533 10537 10534 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 10538 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64( pIemCpu,&u64Imm);10535 uint64_t u64Imm; IEM_OPCODE_GET_NEXT_S32_SX_U64(&u64Imm); 10539 10536 IEM_MC_ASSIGN(u64Src, u64Imm); 10540 10537 IEM_MC_MEM_MAP(pu64Dst, IEM_ACCESS_DATA_R, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 10782 10779 FNIEMOP_DEF(iemOp_Grp3_Eb) 10783 10780 { 10784 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);10781 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 10785 10782 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) 10786 10783 { … … 10798 10795 IEMOP_MNEMONIC("mul Eb"); 10799 10796 IEMOP_VERIFICATION_UNDEFINED_EFLAGS(X86_EFL_SF | X86_EFL_ZF | X86_EFL_AF | X86_EFL_PF); 10800 return FNIEMOP_CALL_2(iemOpCommonGrp3MulDivEb, bRm, &iemAImpl_mul_u8);10797 return FNIEMOP_CALL_2(iemOpCommonGrp3MulDivEb, bRm, iemAImpl_mul_u8); 10801 10798 case 5: 10802 10799 IEMOP_MNEMONIC("imul Eb"); 10803 10800 IEMOP_VERIFICATION_UNDEFINED_EFLAGS(X86_EFL_SF | X86_EFL_ZF | X86_EFL_AF | X86_EFL_PF); 10804 return FNIEMOP_CALL_2(iemOpCommonGrp3MulDivEb, bRm, &iemAImpl_imul_u8);10801 return FNIEMOP_CALL_2(iemOpCommonGrp3MulDivEb, bRm, iemAImpl_imul_u8); 10805 10802 case 6: 10806 10803 IEMOP_MNEMONIC("div Eb"); 10807 10804 IEMOP_VERIFICATION_UNDEFINED_EFLAGS(X86_EFL_SF | X86_EFL_ZF | X86_EFL_AF | X86_EFL_PF | X86_EFL_OF | X86_EFL_CF); 10808 return FNIEMOP_CALL_2(iemOpCommonGrp3MulDivEb, bRm, &iemAImpl_div_u8);10805 return FNIEMOP_CALL_2(iemOpCommonGrp3MulDivEb, bRm, iemAImpl_div_u8); 10809 10806 case 7: 10810 10807 IEMOP_MNEMONIC("idiv Eb"); 10811 10808 IEMOP_VERIFICATION_UNDEFINED_EFLAGS(X86_EFL_SF | X86_EFL_ZF | X86_EFL_AF | X86_EFL_PF | X86_EFL_OF | X86_EFL_CF); 10812 return FNIEMOP_CALL_2(iemOpCommonGrp3MulDivEb, bRm, &iemAImpl_idiv_u8);10809 return FNIEMOP_CALL_2(iemOpCommonGrp3MulDivEb, bRm, iemAImpl_idiv_u8); 10813 10810 IEM_NOT_REACHED_DEFAULT_CASE_RET(); 10814 10811 } … … 10819 10816 FNIEMOP_DEF(iemOp_Grp3_Ev) 10820 10817 { 10821 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);10818 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 10822 10819 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) 10823 10820 { … … 10925 10922 FNIEMOP_DEF(iemOp_Grp4) 10926 10923 { 10927 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);10924 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 10928 10925 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) 10929 10926 { … … 11294 11291 FNIEMOP_DEF(iemOp_Grp5) 11295 11292 { 11296 uint8_t bRm; IEM_OPCODE_GET_NEXT_ BYTE(pIemCpu,&bRm);11293 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 11297 11294 switch ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) 11298 11295 { -
trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
r37002 r37003 39 39 40 40 #define CHK_TYPE(a_ExpectedType, a_Param) \ 41 do { a_ExpectedType *pCheckType = &(a_Param); } while (0)41 do { a_ExpectedType const * pCheckType = &(a_Param); } while (0) 42 42 #define CHK_PTYPE(a_ExpectedType, a_Param) \ 43 43 do { a_ExpectedType pCheckType = (a_Param); } while (0) … … 57 57 #define IEM_NOT_REACHED_DEFAULT_CASE_RET() default: return VERR_INTERNAL_ERROR_4 58 58 59 #define IEM_OPCODE_GET_NEXT_ BYTE(a_pIemCpu, a_pu8)do { *(a_pu8) = g_bRandom; CHK_PTYPE(uint8_t *, a_pu8); } while (0)60 #define IEM_OPCODE_GET_NEXT_U16(a_p IemCpu, a_pu16)do { *(a_pu16) = g_bRandom; CHK_PTYPE(uint16_t *, a_pu16); } while (0)61 #define IEM_OPCODE_GET_NEXT_U32(a_p IemCpu, a_pu32)do { *(a_pu32) = g_bRandom; CHK_PTYPE(uint32_t *, a_pu32); } while (0)62 #define IEM_OPCODE_GET_NEXT_S32_SX_U64(a_p IemCpu, a_pu64)do { *(a_pu64) = g_bRandom; CHK_PTYPE(uint64_t *, a_pu64); } while (0)63 #define IEM_OPCODE_GET_NEXT_U64(a_p IemCpu, a_pu64)do { *(a_pu64) = g_bRandom; CHK_PTYPE(uint64_t *, a_pu64); } while (0)64 #define IEM_OPCODE_GET_NEXT_S8(a_p IemCpu, a_pi8)do { *(a_pi8) = g_bRandom; CHK_PTYPE(int8_t *, a_pi8); } while (0)59 #define IEM_OPCODE_GET_NEXT_U8(a_pu8) do { *(a_pu8) = g_bRandom; CHK_PTYPE(uint8_t *, a_pu8); } while (0) 60 #define IEM_OPCODE_GET_NEXT_U16(a_pu16) do { *(a_pu16) = g_bRandom; CHK_PTYPE(uint16_t *, a_pu16); } while (0) 61 #define IEM_OPCODE_GET_NEXT_U32(a_pu32) do { *(a_pu32) = g_bRandom; CHK_PTYPE(uint32_t *, a_pu32); } while (0) 62 #define IEM_OPCODE_GET_NEXT_S32_SX_U64(a_pu64) do { *(a_pu64) = g_bRandom; CHK_PTYPE(uint64_t *, a_pu64); } while (0) 63 #define IEM_OPCODE_GET_NEXT_U64(a_pu64) do { *(a_pu64) = g_bRandom; CHK_PTYPE(uint64_t *, a_pu64); } while (0) 64 #define IEM_OPCODE_GET_NEXT_S8(a_pi8) do { *(a_pi8) = g_bRandom; CHK_PTYPE(int8_t *, a_pi8); } while (0) 65 65 #define IEM_OPCODE_GET_NEXT_S16(a_pi16) do { *(a_pi16) = g_bRandom; CHK_PTYPE(int16_t *, a_pi16); } while (0) 66 66 #define IEM_OPCODE_GET_NEXT_S32(a_pi32) do { *(a_pi32) = g_bRandom; CHK_PTYPE(int32_t *, a_pi32); } while (0) … … 128 128 IEMOPSHIFTDBLSIZES g_iemAImpl_shrd; 129 129 130 131 #define iemAImpl_idiv_u8 ((PFNIEMAIMPLMULDIVU8)0) 132 #define iemAImpl_div_u8 ((PFNIEMAIMPLMULDIVU8)0) 133 #define iemAImpl_imul_u8 ((PFNIEMAIMPLMULDIVU8)0) 134 #define iemAImpl_mul_u8 ((PFNIEMAIMPLMULDIVU8)0) 135 130 136 /** @} */ 131 137 … … 138 144 #define IEM_MC_PAUSE() do {} while (0) 139 145 #define IEM_MC_CONTINUE() do {} while (0) 140 #define IEM_MC_RETURN_ON_FAILURE(a_Expr) do {} while (0)141 146 #define IEM_MC_ADVANCE_RIP() do {} while (0) 142 147 #define IEM_MC_REL_JMP_S8(a_i8) CHK_TYPE(int8_t, a_i8) 143 148 #define IEM_MC_REL_JMP_S16(a_i16) CHK_TYPE(int16_t, a_i16) 144 149 #define IEM_MC_REL_JMP_S32(a_i32) CHK_TYPE(int32_t, a_i32) 145 #define IEM_MC_SET_RIP_U16(a_u16NewIP) do {} while (0)146 #define IEM_MC_SET_RIP_U32(a_u32NewIP) do {} while (0)147 #define IEM_MC_SET_RIP_U64(a_u64NewIP) do {} while (0)150 #define IEM_MC_SET_RIP_U16(a_u16NewIP) CHK_TYPE(uint16_t, a_u16NewIP) 151 #define IEM_MC_SET_RIP_U32(a_u32NewIP) CHK_TYPE(uint32_t, a_u32NewIP) 152 #define IEM_MC_SET_RIP_U64(a_u64NewIP) CHK_TYPE(uint64_t, a_u64NewIP) 148 153 #define IEM_MC_RAISE_DIVIDE_ERROR() return VERR_TRPM_ACTIVE_TRAP 149 154 #define IEM_MC_MAYBE_RAISE_DEVICE_NOT_AVAILABLE() do {} while (0) … … 159 164 uint32_t a_Name; \ 160 165 uint32_t *a_pName = &a_Name 161 #define IEM_MC_COMMIT_EFLAGS(a_EFlags) do {} while (0)166 #define IEM_MC_COMMIT_EFLAGS(a_EFlags) CHK_TYPE(uint32_t, a_EFlags) 162 167 #define IEM_MC_ASSIGN(a_VarOrArg, a_CVariableOrConst) (a_VarOrArg) = (0) 163 #define IEM_MC_FETCH_GREG_U8(a_u8Dst, a_iGReg) (a_u8Dst) = 0 164 #define IEM_MC_FETCH_GREG_U8_ZX_U16(a_u16Dst, a_iGReg) (a_u16Dst) = 0 165 #define IEM_MC_FETCH_GREG_U8_ZX_U32(a_u32Dst, a_iGReg) (a_u32Dst) = 0 166 #define IEM_MC_FETCH_GREG_U8_ZX_U64(a_u64Dst, a_iGReg) (a_u64Dst) = 0 167 #define IEM_MC_FETCH_GREG_U8_SX_U16(a_u16Dst, a_iGReg) (a_u16Dst) = 0 168 #define IEM_MC_FETCH_GREG_U8_SX_U32(a_u32Dst, a_iGReg) (a_u32Dst) = 0 169 #define IEM_MC_FETCH_GREG_U8_SX_U64(a_u64Dst, a_iGReg) (a_u64Dst) = 0 170 #define IEM_MC_FETCH_GREG_U16(a_u16Dst, a_iGReg) (a_u16Dst) = 0 171 #define IEM_MC_FETCH_GREG_U16_ZX_U32(a_u32Dst, a_iGReg) (a_u32Dst) = 0 172 #define IEM_MC_FETCH_GREG_U16_ZX_U64(a_u64Dst, a_iGReg) (a_u64Dst) = 0 173 #define IEM_MC_FETCH_GREG_U16_SX_U32(a_u32Dst, a_iGReg) (a_u32Dst) = 0 174 #define IEM_MC_FETCH_GREG_U16_SX_U64(a_u64Dst, a_iGReg) (a_u64Dst) = 0 175 #define IEM_MC_FETCH_GREG_U32(a_u32Dst, a_iGReg) (a_u32Dst) = 0 176 #define IEM_MC_FETCH_GREG_U32_ZX_U64(a_u64Dst, a_iGReg) (a_u64Dst) = 0 177 #define IEM_MC_FETCH_GREG_U32_SX_U64(a_u64Dst, a_iGReg) (a_u64Dst) = 0 178 #define IEM_MC_FETCH_GREG_U64(a_u64Dst, a_iGReg) (a_u64Dst) = 0 179 #define IEM_MC_FETCH_SREG_U16(a_u16Dst, a_iSReg) (a_u16Dst) = 0 180 #define IEM_MC_FETCH_SREG_ZX_U32(a_u32Dst, a_iSReg) (a_u32Dst) = 0 181 #define IEM_MC_FETCH_SREG_ZX_U64(a_u64Dst, a_iSReg) (a_u64Dst) = 0 182 #define IEM_MC_FETCH_CR0_U16(a_u16Dst) (a_u16Dst) = 0 183 #define IEM_MC_FETCH_CR0_U32(a_u32Dst) (a_u32Dst) = 0 184 #define IEM_MC_FETCH_CR0_U64(a_u64Dst) (a_u64Dst) = 0 185 #define IEM_MC_FETCH_EFLAGS(a_EFlags) (a_EFlags) = 0 186 #define IEM_MC_FETCH_FSW(a_u16Fsw) (a_u16Fsw) = 0 187 #define IEM_MC_STORE_GREG_U8(a_iGReg, a_u8Value) do {} while (0) 188 #define IEM_MC_STORE_GREG_U16(a_iGReg, a_u16Value) do {} while (0) 189 #define IEM_MC_STORE_GREG_U32(a_iGReg, a_u32Value) do {} while (0) 190 #define IEM_MC_STORE_GREG_U64(a_iGReg, a_u64Value) do {} while (0) 191 #define IEM_MC_CLEAR_HIGH_GREG_U64(a_iGReg) do {} while (0) 192 #define IEM_MC_REF_GREG_U8(a_pu8Dst, a_iGReg) (a_pu8Dst) = (uint8_t *)((uintptr_t)0) 193 #define IEM_MC_REF_GREG_U16(a_pu16Dst, a_iGReg) (a_pu16Dst) = (uint16_t *)((uintptr_t)0) 194 #define IEM_MC_REF_GREG_U32(a_pu32Dst, a_iGReg) (a_pu32Dst) = (uint32_t *)((uintptr_t)0) 195 #define IEM_MC_REF_GREG_U64(a_pu64Dst, a_iGReg) (a_pu64Dst) = (uint64_t *)((uintptr_t)0) 196 #define IEM_MC_REF_EFLAGS(a_pEFlags) (a_pEFlags) = (uint32_t *)((uintptr_t)0) 168 #define IEM_MC_ASSIGN_TO_SMALLER IEM_MC_ASSIGN 169 170 #define IEM_MC_FETCH_GREG_U8(a_u8Dst, a_iGReg) do { (a_u8Dst) = 0; CHK_TYPE(uint8_t, a_u8Dst); } while (0) 171 #define IEM_MC_FETCH_GREG_U8_ZX_U16(a_u16Dst, a_iGReg) do { (a_u16Dst) = 0; CHK_TYPE(uint16_t, a_u16Dst); } while (0) 172 #define IEM_MC_FETCH_GREG_U8_ZX_U32(a_u32Dst, a_iGReg) do { (a_u32Dst) = 0; CHK_TYPE(uint32_t, a_u32Dst); } while (0) 173 #define IEM_MC_FETCH_GREG_U8_ZX_U64(a_u64Dst, a_iGReg) do { (a_u64Dst) = 0; CHK_TYPE(uint64_t, a_u64Dst); } while (0) 174 #define IEM_MC_FETCH_GREG_U8_SX_U16(a_u16Dst, a_iGReg) do { (a_u16Dst) = 0; CHK_TYPE(uint16_t, a_u16Dst); } while (0) 175 #define IEM_MC_FETCH_GREG_U8_SX_U32(a_u32Dst, a_iGReg) do { (a_u32Dst) = 0; CHK_TYPE(uint32_t, a_u32Dst); } while (0) 176 #define IEM_MC_FETCH_GREG_U8_SX_U64(a_u64Dst, a_iGReg) do { (a_u64Dst) = 0; CHK_TYPE(uint64_t, a_u64Dst); } while (0) 177 #define IEM_MC_FETCH_GREG_U16(a_u16Dst, a_iGReg) do { (a_u16Dst) = 0; CHK_TYPE(uint16_t, a_u16Dst); } while (0) 178 #define IEM_MC_FETCH_GREG_U16_ZX_U32(a_u32Dst, a_iGReg) do { (a_u32Dst) = 0; CHK_TYPE(uint32_t, a_u32Dst); } while (0) 179 #define IEM_MC_FETCH_GREG_U16_ZX_U64(a_u64Dst, a_iGReg) do { (a_u64Dst) = 0; CHK_TYPE(uint64_t, a_u64Dst); } while (0) 180 #define IEM_MC_FETCH_GREG_U16_SX_U32(a_u32Dst, a_iGReg) do { (a_u32Dst) = 0; CHK_TYPE(uint32_t, a_u32Dst); } while (0) 181 #define IEM_MC_FETCH_GREG_U16_SX_U64(a_u64Dst, a_iGReg) do { (a_u64Dst) = 0; CHK_TYPE(uint64_t, a_u64Dst); } while (0) 182 #define IEM_MC_FETCH_GREG_U32(a_u32Dst, a_iGReg) do { (a_u32Dst) = 0; CHK_TYPE(uint32_t, a_u32Dst); } while (0) 183 #define IEM_MC_FETCH_GREG_U32_ZX_U64(a_u64Dst, a_iGReg) do { (a_u64Dst) = 0; CHK_TYPE(uint64_t, a_u64Dst); } while (0) 184 #define IEM_MC_FETCH_GREG_U32_SX_U64(a_u64Dst, a_iGReg) do { (a_u64Dst) = 0; CHK_TYPE(uint64_t, a_u64Dst); } while (0) 185 #define IEM_MC_FETCH_GREG_U64(a_u64Dst, a_iGReg) do { (a_u64Dst) = 0; CHK_TYPE(uint64_t, a_u64Dst); } while (0) 186 #define IEM_MC_FETCH_SREG_U16(a_u16Dst, a_iSReg) do { (a_u16Dst) = 0; CHK_TYPE(uint16_t, a_u16Dst); } while (0) 187 #define IEM_MC_FETCH_SREG_ZX_U32(a_u32Dst, a_iSReg) do { (a_u32Dst) = 0; CHK_TYPE(uint32_t, a_u32Dst); } while (0) 188 #define IEM_MC_FETCH_SREG_ZX_U64(a_u64Dst, a_iSReg) do { (a_u64Dst) = 0; CHK_TYPE(uint64_t, a_u64Dst); } while (0) 189 #define IEM_MC_FETCH_CR0_U16(a_u16Dst) do { (a_u16Dst) = 0; CHK_TYPE(uint16_t, a_u16Dst); } while (0) 190 #define IEM_MC_FETCH_CR0_U32(a_u32Dst) do { (a_u32Dst) = 0; CHK_TYPE(uint32_t, a_u32Dst); } while (0) 191 #define IEM_MC_FETCH_CR0_U64(a_u64Dst) do { (a_u64Dst) = 0; CHK_TYPE(uint64_t, a_u64Dst); } while (0) 192 #define IEM_MC_FETCH_EFLAGS(a_EFlags) do { (a_EFlags) = 0; CHK_TYPE(uint32_t, a_EFlags); } while (0) 193 #define IEM_MC_FETCH_FSW(a_u16Fsw) do { (a_u16Fsw) = 0; CHK_TYPE(uint16_t, a_u16Fsw); } while (0) 194 #define IEM_MC_STORE_GREG_U8(a_iGReg, a_u8Value) do { CHK_TYPE(uint8_t, a_u8Value); } while (0) 195 #define IEM_MC_STORE_GREG_U16(a_iGReg, a_u16Value) do { CHK_TYPE(uint16_t, a_u16Value); } while (0) 196 #define IEM_MC_STORE_GREG_U32(a_iGReg, a_u32Value) do { } while (0) 197 #define IEM_MC_STORE_GREG_U64(a_iGReg, a_u64Value) do { } while (0) 198 #define IEM_MC_STORE_GREG_U8_CONST(a_iGReg, a_u8C) do { AssertCompile((uint8_t )(a_u8C) == (a_u8C) ); } while (0) 199 #define IEM_MC_STORE_GREG_U16_CONST(a_iGReg, a_u16C) do { AssertCompile((uint16_t)(a_u16C) == (a_u16C)); } while (0) 200 #define IEM_MC_STORE_GREG_U32_CONST(a_iGReg, a_u32C) do { AssertCompile((uint32_t)(a_u32C) == (a_u32C)); } while (0) 201 #define IEM_MC_STORE_GREG_U64_CONST(a_iGReg, a_u64C) do { AssertCompile((uint64_t)(a_u64C) == (a_u64C)); } while (0) 202 #define IEM_MC_CLEAR_HIGH_GREG_U64(a_iGReg) do { } while (0) 203 #define IEM_MC_REF_GREG_U8(a_pu8Dst, a_iGReg) do { (a_pu8Dst) = (uint8_t *)((uintptr_t)0); CHK_PTYPE(uint8_t *, a_pu8Dst); } while (0) 204 #define IEM_MC_REF_GREG_U16(a_pu16Dst, a_iGReg) do { (a_pu16Dst) = (uint16_t *)((uintptr_t)0); CHK_PTYPE(uint16_t *, a_pu16Dst); } while (0) 205 #define IEM_MC_REF_GREG_U32(a_pu32Dst, a_iGReg) do { (a_pu32Dst) = (uint32_t *)((uintptr_t)0); CHK_PTYPE(uint32_t *, a_pu32Dst); } while (0) 206 #define IEM_MC_REF_GREG_U64(a_pu64Dst, a_iGReg) do { (a_pu64Dst) = (uint64_t *)((uintptr_t)0); CHK_PTYPE(uint64_t *, a_pu64Dst); } while (0) 207 #define IEM_MC_REF_EFLAGS(a_pEFlags) do { (a_pEFlags) = (uint32_t *)((uintptr_t)0); CHK_PTYPE(uint32_t *, a_pEFlags); } while (0) 197 208 #define IEM_MC_ADD_GREG_U8(a_iGReg, a_u16Value) do {} while (0) 198 209 #define IEM_MC_ADD_GREG_U16(a_iGReg, a_u16Value) do {} while (0)
Note:
See TracChangeset
for help on using the changeset viewer.