Changeset 66810 in vbox
- Timestamp:
- May 5, 2017 2:36:10 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 115231
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/disopcode.h
r66808 r66810 1077 1077 #define OP_PARM_MRO OP_PARM_M /**< Annotates read only memory of variable operand size (xrstor). */ 1078 1078 #define OP_PARM_MRW OP_PARM_M /**< Annotates read-write memory of variable operand size (xsave). */ 1079 #define OP_PARM_Nq OP_PARM_Qq /**< Missing 'N' class (MMX reg selected by modrm.mem) in disasm. */ 1079 1080 1080 1081 /** @} */ -
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r66785 r66810 11138 11138 #define IEM_MC_CLEAR_FSW_EX() do { (pVCpu)->iem.s.CTX_SUFF(pCtx)->CTX_SUFF(pXState)->x87.FSW &= X86_FSW_C_MASK | X86_FSW_TOP_MASK; } while (0) 11139 11139 11140 /** Switches the FPU state to MMX mode (FSW.TOS=0, FTW=0) if necessary. */ 11141 #define IEM_MC_FPU_TO_MMX_MODE() do { \ 11142 IEM_GET_CTX(pVCpu)->CTX_SUFF(pXState)->x87.FSW &= ~X86_FSW_TOP_MASK; \ 11143 IEM_GET_CTX(pVCpu)->CTX_SUFF(pXState)->x87.FTW = 0xff; \ 11144 } while (0) 11140 11145 11141 11146 #define IEM_MC_FETCH_MREG_U64(a_u64Value, a_iMReg) \ -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
r66479 r66810 549 549 550 550 551 /** Invalid with RM byte where intel decodes any additional address encoding 552 * bytes. */ 553 FNIEMOPRM_DEF(iemOp_InvalidWithRMNeedDecode) 554 { 555 IEMOP_MNEMONIC(InvalidWithRMNeedDecode, "InvalidWithRMNeedDecode"); 556 if (pVCpu->iem.s.enmCpuVendor == CPUMCPUVENDOR_INTEL) 557 { 558 #ifndef TST_IEM_CHECK_MC 559 if ((bRm & X86_MODRM_MOD_MASK) != (3 << X86_MODRM_MOD_SHIFT)) 560 { 561 RTGCPTR GCPtrEff; 562 VBOXSTRICTRC rcStrict = iemOpHlpCalcRmEffAddr(pVCpu, bRm, 0, &GCPtrEff); 563 if (rcStrict != VINF_SUCCESS) 564 return rcStrict; 565 } 566 #endif 567 } 568 IEMOP_HLP_DONE_DECODING(); 569 return IEMOP_RAISE_INVALID_OPCODE(); 570 } 571 572 551 573 /** Invalid with RM byte where both AMD and Intel decodes any additional 552 574 * address encoding bytes. */ -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsPython.py
r66808 r66810 227 227 'Uq': ( 'IDX_UseModRM', 'rm', '%Uq', 'Uq', ), 228 228 'UqHi': ( 'IDX_UseModRM', 'rm', '%Uq', 'UqHi', ), 229 'Nq': ( 'IDX_UseModRM', 'rm', '%Qq', 'Nq', ), 229 230 230 231 # ModR/M.rm - memory only. … … 235 236 'Mq': ( 'IDX_UseModRM', 'rm', '%Mq', 'Mq', ), 236 237 'MqWO': ( 'IDX_UseModRM', 'rm', '%Mq', 'Mq', ), 237 'MRO': ( 'IDX_UseModRM', 'rm', '%M', 'M', ),238 'MRW': ( 'IDX_UseModRM', 'rm', '%M', 'M', ),238 'MRO': ( 'IDX_UseModRM', 'rm', '%M', 'M', ), 239 'MRW': ( 'IDX_UseModRM', 'rm', '%M', 'M', ), 239 240 240 241 # ModR/M.reg -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r66808 r66810 4322 4322 * @optest op1=1 op2=2 -> op1=2 4323 4323 * @optest op1=0 op2=-42 -> op1=-42 4324 * @oponly4325 4324 */ 4326 4325 FNIEMOP_DEF(iemOp_movq_Vq_Wq) … … 8386 8385 8387 8386 8388 /** Opcode 0xf3 0x0f 0xd6 - movq2dq Vdq, Nq */ 8389 FNIEMOP_STUB(iemOp_movq2dq_Vdq_Nq); 8387 /** 8388 * @opcode 0xd6 8389 * @opcodesub 11 mr/reg 8390 * @oppfx f3 8391 * @opcpuid sse2 8392 * @opgroup og_sse2_simdint_datamove 8393 * @optest op1=1 op2=2 -> op1=2 ftw=0xff 8394 * @optest op1=0 op2=-42 -> op1=-42 ftw=0xff 8395 */ 8396 FNIEMOP_DEF(iemOp_movq2dq_Vdq_Nq) 8397 { 8398 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 8399 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 8400 { 8401 /* 8402 * Register, register. 8403 */ 8404 IEMOP_MNEMONIC2(RM_REG, MOVQ2DQ, movq2dq, VqZxReg, Nq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE); 8405 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 8406 IEM_MC_BEGIN(0, 2); 8407 IEM_MC_LOCAL(uint64_t, uSrc); 8408 8409 IEM_MC_MAYBE_RAISE_SSE2_RELATED_XCPT(); 8410 IEM_MC_ACTUALIZE_FPU_STATE_FOR_CHANGE(); 8411 8412 IEM_MC_FETCH_MREG_U64(uSrc, (bRm & X86_MODRM_RM_MASK) | pVCpu->iem.s.uRexB); 8413 IEM_MC_STORE_XREG_U64_ZX_U128(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg, uSrc); 8414 IEM_MC_FPU_TO_MMX_MODE(); 8415 8416 IEM_MC_ADVANCE_RIP(); 8417 IEM_MC_END(); 8418 return VINF_SUCCESS; 8419 } 8420 8421 /** 8422 * @opdone 8423 * @opmnemonic udf30fd6mem 8424 * @opcode 0xd6 8425 * @opcodesub !11 mr/reg 8426 * @oppfx f3 8427 * @opunused intel-modrm 8428 * @opcpuid sse 8429 * @optest -> 8430 */ 8431 return FNIEMOP_CALL_1(iemOp_InvalidWithRMNeedDecode, bRm); 8432 } 8433 8390 8434 /** Opcode 0xf2 0x0f 0xd6 - movdq2q Pq, Uq */ 8391 8435 FNIEMOP_STUB(iemOp_movdq2q_Pq_Uq); -
trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
r66785 r66810 492 492 #define IEM_MC_FLIP_EFL_BIT(a_fBit) do { CHK_SINGLE_BIT(uint32_t, a_fBit); } while (0) 493 493 #define IEM_MC_CLEAR_FSW_EX() do { } while (0) 494 494 #define IEM_MC_FPU_TO_MMX_MODE() do { (void)fFpuWrite; } while (0) 495 495 496 496 #define IEM_MC_FETCH_MREG_U64(a_u64Value, a_iMReg) do { (a_u64Value) = 0; CHK_TYPE(uint64_t, a_u64Value); (void)fFpuRead; } while (0) -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-data.py
r66748 r66810 308 308 self.sEncoding += '_MOD_EQ_3' if oInstr.sSubOpcode == '11 mr/reg' else '_MOD_NE_3'; 309 309 elif oInstr.sInvalidStyle == 'intel-modrm': 310 self.sEncoding = 'BS3CG1ENC_MODRM_Gv_Ev'; 310 if oInstr.sSubOpcode is None: 311 self.sEncoding = 'BS3CG1ENC_MODRM_Gv_Ev'; 312 elif oInstr.sSubOpcode == '11 mr/reg': 313 self.sEncoding = 'BS3CG1ENC_MODRM_MOD_EQ_3'; 314 elif oInstr.sSubOpcode == '!11 mr/reg': 315 self.sEncoding = 'BS3CG1ENC_MODRM_MOD_NE_3'; 316 else: 317 raise Exception('Unhandled sSubOpcode=%s for sInvalidStyle=%s' % (oInstr.sSubOpcode, oInstr.sInvalidStyle)); 311 318 312 319 self.asFlags = []; -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
r66808 r66810 1797 1797 1798 1798 1799 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_VqZxReg_Nq(PBS3CG1STATE pThis, unsigned iEncoding) 1800 { 1801 unsigned off; 1802 if (iEncoding == 0) 1803 { 1804 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1805 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0); 1806 pThis->aOperands[pThis->iRmOp ].idxField = BS3CG1DST_MM0; 1807 pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM1_LO_ZX; 1808 } 1809 else if (iEncoding == 1) 1810 { 1811 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1812 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 7); 1813 pThis->aOperands[pThis->iRmOp ].idxField = BS3CG1DST_MM7; 1814 pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM6_LO_ZX; 1815 } 1816 else 1817 return 0; 1818 pThis->cbCurInstr = off; 1819 return iEncoding + 1; 1820 } 1821 1822 1799 1823 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_Gv_Ma(PBS3CG1STATE pThis, unsigned iEncoding) 1800 1824 { … … 2233 2257 case BS3CG1ENC_MODRM_VqZxReg_Wq: 2234 2258 return Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_VsdZxReg_Wsd__OR__MODRM_VqZxReg_Wq(pThis, iEncoding); 2259 case BS3CG1ENC_MODRM_VqZxReg_Nq: 2260 return Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_VqZxReg_Nq(pThis, iEncoding); 2235 2261 2236 2262 case BS3CG1ENC_MODRM_Gv_Ma: … … 2424 2450 case BS3CG1ENC_MODRM_VsdZxReg_Wsd: 2425 2451 case BS3CG1ENC_MODRM_VqZxReg_Wq: 2452 case BS3CG1ENC_MODRM_VqZxReg_Nq: 2426 2453 pThis->iRmOp = 1; 2427 2454 pThis->iRegOp = 0; -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h
r66808 r66810 54 54 BS3CG1OP_Gb, 55 55 BS3CG1OP_Gv, 56 BS3CG1OP_Nq, 56 57 BS3CG1OP_Uq, 57 58 BS3CG1OP_UqHi, … … 117 118 BS3CG1ENC_MODRM_VsdZxReg_Wsd, 118 119 BS3CG1ENC_MODRM_VqZxReg_Wq, 120 BS3CG1ENC_MODRM_VqZxReg_Nq, 119 121 BS3CG1ENC_MODRM_MbRO, 120 122 BS3CG1ENC_MODRM_MdRO,
Note:
See TracChangeset
for help on using the changeset viewer.