Changeset 65587 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Feb 2, 2017 12:35:27 PM (8 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r65508 r65587 866 866 pVCpu->iem.s.enmCpuMode = iemCalcCpuMode(pCtx); 867 867 #ifdef VBOX_STRICT 868 pVCpu->iem.s.enmDefAddrMode = (IEMMODE)0x c0fe;869 pVCpu->iem.s.enmEffAddrMode = (IEMMODE)0x c0fe;870 pVCpu->iem.s.enmDefOpSize = (IEMMODE)0x c0fe;871 pVCpu->iem.s.enmEffOpSize = (IEMMODE)0x c0fe;868 pVCpu->iem.s.enmDefAddrMode = (IEMMODE)0xfe; 869 pVCpu->iem.s.enmEffAddrMode = (IEMMODE)0xfe; 870 pVCpu->iem.s.enmDefOpSize = (IEMMODE)0xfe; 871 pVCpu->iem.s.enmEffOpSize = (IEMMODE)0xfe; 872 872 pVCpu->iem.s.fPrefixes = 0xfeedbeef; 873 873 pVCpu->iem.s.uRexReg = 127; … … 875 875 pVCpu->iem.s.uRexIndex = 127; 876 876 pVCpu->iem.s.iEffSeg = 127; 877 pVCpu->iem.s.idxPrefix = 127; 878 pVCpu->iem.s.uVex3rdReg = 127; 879 pVCpu->iem.s.uVexLength = 127; 880 pVCpu->iem.s.fEvexStuff = 127; 877 881 pVCpu->iem.s.uFpuOpcode = UINT16_MAX; 878 882 # ifdef IEM_WITH_CODE_TLB … … 985 989 pVCpu->iem.s.uRexB = 0; 986 990 pVCpu->iem.s.uRexIndex = 0; 991 pVCpu->iem.s.idxPrefix = 0; 992 pVCpu->iem.s.uVex3rdReg = 0; 993 pVCpu->iem.s.uVexLength = 0; 994 pVCpu->iem.s.fEvexStuff = 0; 987 995 pVCpu->iem.s.iEffSeg = X86_SREG_DS; 988 996 #ifdef IEM_WITH_CODE_TLB … … 1076 1084 pVCpu->iem.s.uRexB = 0; 1077 1085 pVCpu->iem.s.uRexIndex = 0; 1086 pVCpu->iem.s.fPrefixes = 0; 1087 pVCpu->iem.s.uVex3rdReg = 0; 1088 pVCpu->iem.s.uVexLength = 0; 1089 pVCpu->iem.s.fEvexStuff = 0; 1078 1090 pVCpu->iem.s.iEffSeg = X86_SREG_DS; 1079 1091 #ifdef IEM_WITH_CODE_TLB -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
r65509 r65587 7092 7092 /** Opcode 0x0f 0xd5. */ 7093 7093 FNIEMOP_STUB(iemOp_pmulq_Pq_Qq__pmullw_Vdq_Wdq); 7094 7094 7095 /** Opcode 0x0f 0xd6. */ 7095 FNIEMOP_STUB(iemOp_movq_Wq_Vq__movq2dq_Vdq_Nq__movdq2q_Pq_Uq); /** @todo Win10 w/o np may need this: 66 0f d6 0a */ 7096 FNIEMOP_STUB(iemOp_movq_Wq_Vq__movq2dq_Vdq_Nq__movdq2q_Pq_Uq); 7097 #if 0 7098 FNIEMOP_DEF(iemOp_movq_Wq_Vq__movq2dq_Vdq_Nq__movdq2q_Pq_Uq) 7099 { 7100 /* Docs says register only. */ 7101 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 7102 7103 switch (pVCpu->iem.s.fPrefixes & (IEM_OP_PRF_SIZE_OP | IEM_OP_PRF_REPNZ | IEM_OP_PRF_REPZ)) 7104 { 7105 case IEM_OP_PRF_SIZE_OP: /* SSE */ 7106 IEMOP_MNEMONIC(movq_Wq_Vq, "movq Wq,Vq"); 7107 IEMOP_HLP_DECODED_NL_2(OP_PMOVMSKB, IEMOPFORM_RM_REG, OP_PARM_Gd, OP_PARM_Vdq, DISOPTYPE_SSE | DISOPTYPE_HARMLESS); 7108 IEM_MC_BEGIN(2, 0); 7109 IEM_MC_ARG(uint64_t *, pDst, 0); 7110 IEM_MC_ARG(uint128_t const *, pSrc, 1); 7111 IEM_MC_MAYBE_RAISE_SSE2_RELATED_XCPT(); 7112 IEM_MC_PREPARE_SSE_USAGE(); 7113 IEM_MC_REF_GREG_U64(pDst, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg); 7114 IEM_MC_REF_XREG_U128_CONST(pSrc, (bRm & X86_MODRM_RM_MASK) | pVCpu->iem.s.uRexB); 7115 IEM_MC_CALL_SSE_AIMPL_2(iemAImpl_pmovmskb_u128, pDst, pSrc); 7116 IEM_MC_ADVANCE_RIP(); 7117 IEM_MC_END(); 7118 return VINF_SUCCESS; 7119 7120 case 0: /* MMX */ 7121 I E M O P _ M N E M O N I C(pmovmskb_Gd_Udq, "pmovmskb Gd,Udq"); 7122 IEMOP_HLP_DECODED_NL_2(OP_PMOVMSKB, IEMOPFORM_RM_REG, OP_PARM_Gd, OP_PARM_Vdq, DISOPTYPE_MMX | DISOPTYPE_HARMLESS); 7123 IEM_MC_BEGIN(2, 0); 7124 IEM_MC_ARG(uint64_t *, pDst, 0); 7125 IEM_MC_ARG(uint64_t const *, pSrc, 1); 7126 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT_CHECK_SSE_OR_MMXEXT(); 7127 IEM_MC_PREPARE_FPU_USAGE(); 7128 IEM_MC_REF_GREG_U64(pDst, (bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK); 7129 IEM_MC_REF_MREG_U64_CONST(pSrc, bRm & X86_MODRM_RM_MASK); 7130 IEM_MC_CALL_MMX_AIMPL_2(iemAImpl_pmovmskb_u64, pDst, pSrc); 7131 IEM_MC_ADVANCE_RIP(); 7132 IEM_MC_END(); 7133 return VINF_SUCCESS; 7134 7135 default: 7136 return IEMOP_RAISE_INVALID_OPCODE(); 7137 } 7138 } 7139 #endif 7096 7140 7097 7141 -
trunk/src/VBox/VMM/include/IEMInternal.h
r65506 r65587 429 429 IEMMODE enmCpuMode; /* 0x04 */ 430 430 /** The CPL. */ 431 uint8_t uCpl; /* 0x0 8*/431 uint8_t uCpl; /* 0x05 */ 432 432 433 433 /** Whether to bypass access handlers or not. */ 434 bool fBypassHandlers; /* 0x0 9*/434 bool fBypassHandlers; /* 0x06 */ 435 435 /** Indicates that we're interpreting patch code - RC only! */ 436 bool fInPatchCode; /* 0x0 a*/436 bool fInPatchCode; /* 0x07 */ 437 437 438 438 /** @name Decoder state. 439 439 * @{ */ 440 440 #ifdef IEM_WITH_CODE_TLB 441 /** Unused. */442 uint8_t bUnused0; /* 0x0b */443 441 /** The offset of the next instruction byte. */ 444 uint32_t offInstrNextByte; /* 0x0c */ 442 uint32_t offInstrNextByte; /* 0x08 */ 443 /** The number of bytes available at pbInstrBuf for the current instruction. 444 * This takes the max opcode length into account so that doesn't need to be 445 * checked separately. */ 446 uint32_t cbInstrBuf; /* 0x0c */ 445 447 /** Pointer to the page containing RIP, user specified buffer or abOpcode. 446 448 * This can be NULL if the page isn't mappable for some reason, in which … … 456 458 */ 457 459 uint8_t const *pbInstrBuf; /* 0x10 */ 458 # if defined(IN_RC) && HC_ARCH_BITS != 32460 # if ARCH_BITS == 32 459 461 uint32_t uInstrBufHigh; /** The high dword of the host context pbInstrBuf member. */ 460 462 # endif … … 462 464 * This is set to a non-canonical address when we need to invalidate it. */ 463 465 uint64_t uInstrBufPc; /* 0x18 */ 464 /** The number of bytes available at pbInstrBuf for the current instruction.465 * This takes the max opcode length into account so that doesn't need to be466 * checked separately. */467 uint32_t cbInstrBuf; /* 0x20 */468 466 /** The number of bytes available at pbInstrBuf in total (for IEMExecLots). 469 467 * This takes the CS segment limit into account. */ 470 uint16_t cbInstrBufTotal; /* 0x2 4*/468 uint16_t cbInstrBufTotal; /* 0x20 */ 471 469 /** Offset into pbInstrBuf of the first byte of the current instruction. 472 470 * Can be negative to efficiently handle cross page instructions. */ 473 int16_t offCurInstrStart; /* 0x2 6*/471 int16_t offCurInstrStart; /* 0x22 */ 474 472 475 473 /** The prefix mask (IEM_OP_PRF_XXX). */ 476 uint32_t fPrefixes; /* 0x2 8*/474 uint32_t fPrefixes; /* 0x24 */ 477 475 /** The extra REX ModR/M register field bit (REX.R << 3). */ 478 uint8_t uRexReg; /* 0x2 c*/476 uint8_t uRexReg; /* 0x28 */ 479 477 /** The extra REX ModR/M r/m field, SIB base and opcode reg bit 480 478 * (REX.B << 3). */ 481 uint8_t uRexB; /* 0x2 d*/479 uint8_t uRexB; /* 0x29 */ 482 480 /** The extra REX SIB index field bit (REX.X << 3). */ 483 uint8_t uRexIndex; /* 0x2 e*/481 uint8_t uRexIndex; /* 0x2a */ 484 482 485 483 /** The effective segment register (X86_SREG_XXX). */ 486 uint8_t iEffSeg; /* 0x2 f*/484 uint8_t iEffSeg; /* 0x2b */ 487 485 488 486 #else 487 /** The size of what has currently been fetched into abOpcodes. */ 488 uint8_t cbOpcode; /* 0x08 */ 489 489 /** The current offset into abOpcodes. */ 490 uint8_t offOpcode; /* 0x0b */ 491 /** The size of what has currently been fetched into abOpcodes. */ 492 uint8_t cbOpcode; /* 0x0c */ 490 uint8_t offOpcode; /* 0x09 */ 493 491 494 492 /** The effective segment register (X86_SREG_XXX). */ 495 uint8_t iEffSeg; /* 0x0 d*/493 uint8_t iEffSeg; /* 0x0a */ 496 494 497 495 /** The extra REX ModR/M register field bit (REX.R << 3). */ 498 uint8_t uRexReg; /* 0x0e */ 496 uint8_t uRexReg; /* 0x0b */ 497 /** The prefix mask (IEM_OP_PRF_XXX). */ 498 uint32_t fPrefixes; /* 0x0c */ 499 499 /** The extra REX ModR/M r/m field, SIB base and opcode reg bit 500 500 * (REX.B << 3). */ 501 uint8_t uRexB; /* 0x0f */ 502 /** The prefix mask (IEM_OP_PRF_XXX). */ 503 uint32_t fPrefixes; /* 0x10 */ 501 uint8_t uRexB; /* 0x10 */ 504 502 /** The extra REX SIB index field bit (REX.X << 3). */ 505 uint8_t uRexIndex; /* 0x14 */ 506 507 /** Explicit alignment padding. */ 508 uint8_t abAlignment1[3]; /* 0x15 */ 509 #endif 510 511 /** The effective operand mode . */ 512 IEMMODE enmEffOpSize; /* 0x30, 0x18 */ 513 /** The default addressing mode . */ 514 IEMMODE enmDefAddrMode; /* 0x34, 0x1c */ 515 /** The effective addressing mode . */ 516 IEMMODE enmEffAddrMode; /* 0x38, 0x20 */ 517 /** The default operand mode . */ 518 IEMMODE enmDefOpSize; /* 0x3c, 0x24 */ 503 uint8_t uRexIndex; /* 0x11 */ 504 505 #endif 506 507 /** The effective operand mode. */ 508 IEMMODE enmEffOpSize; /* 0x2c, 0x12 */ 509 /** The default addressing mode. */ 510 IEMMODE enmDefAddrMode; /* 0x2d, 0x13 */ 511 /** The effective addressing mode. */ 512 IEMMODE enmEffAddrMode; /* 0x2e, 0x14 */ 513 /** The default operand mode. */ 514 IEMMODE enmDefOpSize; /* 0x2f, 0x15 */ 515 516 /** Prefix index (VEX.pp) for two byte and three byte tables. */ 517 uint8_t idxPrefix; /* 0x30, 0x16 */ 518 /** 3rd (E)VEX register. */ 519 uint8_t uVex3rdReg; /* 0x31, 0x17 */ 520 /** The VEX/EVEX length field. */ 521 uint8_t uVexLength; /* 0x32, 0x18 */ 522 /** Additional EVEX stuff. */ 523 uint8_t fEvexStuff; /* 0x33, 0x19 */ 519 524 520 525 /** The FPU opcode (FOP). */ 521 uint16_t uFpuOpcode; /* 0x40, 0x28 */ 522 /** Align the opcode buffer on a dword boundrary. */ 523 uint8_t abAlignment2a[2]; /* 0x42, 0x2a */ 524 525 /** The opcode bytes. */ 526 uint8_t abOpcode[15]; /* 0x44, 0x2c */ 526 uint16_t uFpuOpcode; /* 0x34, 0x1a */ 527 527 528 /** Explicit alignment padding. */ 528 529 #ifdef IEM_WITH_CODE_TLB 529 uint8_t abAlignment2b[1+4]; /* 0x53 */ 530 uint8_t abAlignment2a[2]; /* 0x36 */ 531 #endif 532 533 /** The opcode bytes. */ 534 uint8_t abOpcode[15]; /* 0x48, 0x1c */ 535 /** Explicit alignment padding. */ 536 #ifdef IEM_WITH_CODE_TLB 537 uint8_t abAlignment2c[0x48 - 0x47]; /* 0x37 */ 530 538 #else 531 uint8_t abAlignment2 b[1+28]; /* 0x3b */539 uint8_t abAlignment2c[0x48 - 0x2b]; /* 0x2b */ 532 540 #endif 533 541 /** @} */ … … 535 543 536 544 /** The flags of the current exception / interrupt. */ 537 uint32_t fCurXcpt; /* 0x 58, 0x58 */545 uint32_t fCurXcpt; /* 0x48, 0x48 */ 538 546 /** The current exception / interrupt. */ 539 547 uint8_t uCurXcpt; … … 680 688 /** @} */ 681 689 682 uint32_t au32Alignment8[HC_ARCH_BITS == 64 ? 1 + 2 + 8 : 1 + 2]; /**< Alignment padding. */690 uint32_t au32Alignment8[HC_ARCH_BITS == 64 ? 1 + 2 + 4 + 8 : 1 + 2 + 4]; /**< Alignment padding. */ 683 691 684 692 /** Data TLB. … … 719 727 #endif 720 728 } IEMCPU; 729 AssertCompileMemberOffset(IEMCPU, fCurXcpt, 0x48); 721 730 AssertCompileMemberAlignment(IEMCPU, DataTlb, 64); 722 731 AssertCompileMemberAlignment(IEMCPU, CodeTlb, 64);
Note:
See TracChangeset
for help on using the changeset viewer.