Changeset 67013 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- May 22, 2017 12:41:30 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r67012 r67013 4389 4389 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 4390 4390 if (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_SIZE_REX_W) 4391 IEMOP_MNEMONIC(movq_Eq_Pq, "movq Eq,Pq"); 4392 else 4393 IEMOP_MNEMONIC(movd_Ed_Pd, "movd Ed,Pd"); 4394 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 4395 { 4396 /* greg, MMX */ 4397 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 4398 IEM_MC_BEGIN(0, 1); 4399 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT(); 4400 IEM_MC_ACTUALIZE_FPU_STATE_FOR_READ(); 4401 if (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_SIZE_REX_W) 4391 { 4392 /** 4393 * @opcode 0x7e 4394 * @opcodesub rex.w=1 4395 * @oppfx none 4396 * @opcpuid mmx 4397 * @opgroup og_mmx_datamove 4398 * @opxcpttype 5 4399 * @optest 64-bit / op1=1 op2=2 -> op1=2 ftw=0xff 4400 * @optest 64-bit / op1=0 op2=-42 -> op1=-42 ftw=0xff 4401 * @oponly 4402 */ 4403 IEMOP_MNEMONIC2(MR, MOVQ, movq, Eq_WO, Pq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OZ_PFX); 4404 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 4402 4405 { 4406 /* greg64, MMX */ 4407 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 4408 IEM_MC_BEGIN(0, 1); 4403 4409 IEM_MC_LOCAL(uint64_t, u64Tmp); 4410 4411 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT(); 4412 IEM_MC_ACTUALIZE_FPU_STATE_FOR_CHANGE(); 4413 4404 4414 IEM_MC_FETCH_MREG_U64(u64Tmp, (bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK); 4405 4415 IEM_MC_STORE_GREG_U64((bRm & X86_MODRM_RM_MASK) | pVCpu->iem.s.uRexB, u64Tmp); 4416 IEM_MC_FPU_TO_MMX_MODE(); 4417 4418 IEM_MC_ADVANCE_RIP(); 4419 IEM_MC_END(); 4406 4420 } 4407 4421 else 4408 4422 { 4423 /* [mem64], MMX */ 4424 IEM_MC_BEGIN(0, 2); 4425 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 4426 IEM_MC_LOCAL(uint64_t, u64Tmp); 4427 4428 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 4429 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 4430 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT(); 4431 IEM_MC_ACTUALIZE_FPU_STATE_FOR_CHANGE(); 4432 4433 IEM_MC_FETCH_MREG_U64(u64Tmp, (bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK); 4434 IEM_MC_STORE_MEM_U64(pVCpu->iem.s.iEffSeg, GCPtrEffSrc, u64Tmp); 4435 IEM_MC_FPU_TO_MMX_MODE(); 4436 4437 IEM_MC_ADVANCE_RIP(); 4438 IEM_MC_END(); 4439 } 4440 } 4441 else 4442 { 4443 /** 4444 * @opdone 4445 * @opcode 0x7e 4446 * @opcodesub rex.w=0 4447 * @oppfx none 4448 * @opcpuid mmx 4449 * @opgroup og_mmx_datamove 4450 * @opxcpttype 5 4451 * @opfunction iemOp_movd_q_Pd_Ey 4452 * @optest op1=1 op2=2 -> op1=2 ftw=0xff 4453 * @optest op1=0 op2=-42 -> op1=-42 ftw=0xff 4454 * @oponly 4455 */ 4456 IEMOP_MNEMONIC2(MR, MOVD, movd, Ed_WO, Pd, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OZ_PFX); 4457 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 4458 { 4459 /* greg32, MMX */ 4460 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 4461 IEM_MC_BEGIN(0, 1); 4409 4462 IEM_MC_LOCAL(uint32_t, u32Tmp); 4463 4464 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT(); 4465 IEM_MC_ACTUALIZE_FPU_STATE_FOR_CHANGE(); 4466 4410 4467 IEM_MC_FETCH_MREG_U32(u32Tmp, (bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK); 4411 4468 IEM_MC_STORE_GREG_U32((bRm & X86_MODRM_RM_MASK) | pVCpu->iem.s.uRexB, u32Tmp); 4412 } 4413 IEM_MC_ADVANCE_RIP(); 4414 IEM_MC_END(); 4415 } 4416 else 4417 { 4418 /* [mem], MMX */ 4419 IEM_MC_BEGIN(0, 2); 4420 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 4421 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT(); 4422 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 1); 4423 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 4424 IEM_MC_ACTUALIZE_FPU_STATE_FOR_READ(); 4425 if (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_SIZE_REX_W) 4426 { 4427 IEM_MC_LOCAL(uint64_t, u64Tmp); 4428 IEM_MC_FETCH_MREG_U64(u64Tmp, (bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK); 4429 IEM_MC_STORE_MEM_U64(pVCpu->iem.s.iEffSeg, GCPtrEffSrc, u64Tmp); 4469 IEM_MC_FPU_TO_MMX_MODE(); 4470 4471 IEM_MC_ADVANCE_RIP(); 4472 IEM_MC_END(); 4430 4473 } 4431 4474 else 4432 4475 { 4476 /* [mem32], MMX */ 4477 IEM_MC_BEGIN(0, 2); 4478 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 4433 4479 IEM_MC_LOCAL(uint32_t, u32Tmp); 4480 4481 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 4482 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 4483 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT(); 4484 IEM_MC_ACTUALIZE_FPU_STATE_FOR_CHANGE(); 4485 4434 4486 IEM_MC_FETCH_MREG_U32(u32Tmp, (bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK); 4435 4487 IEM_MC_STORE_MEM_U32(pVCpu->iem.s.iEffSeg, GCPtrEffSrc, u32Tmp); 4488 IEM_MC_FPU_TO_MMX_MODE(); 4489 4490 IEM_MC_ADVANCE_RIP(); 4491 IEM_MC_END(); 4436 4492 } 4437 IEM_MC_ADVANCE_RIP();4438 IEM_MC_END();4439 } 4440 return VINF_SUCCESS; 4441 } 4493 } 4494 return VINF_SUCCESS; 4495 4496 } 4497 4442 4498 4443 4499 /** Opcode 0x66 0x0f 0x7e - movd_q Ey, Vy */
Note:
See TracChangeset
for help on using the changeset viewer.