- Timestamp:
- May 22, 2017 11:36:46 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/disopcode.h
r67004 r67006 789 789 OP_VMOVNTPS, 790 790 OP_VMOVNTPD, 791 OP_VMOVD, 792 OP_VMOVQ, 791 793 /** @} */ 792 794 OP_END_OF_OPCODES … … 1101 1103 #define OP_PARM_Usd_WO OP_PARM_Usd /**< Annotates write only operand. */ 1102 1104 #define OP_PARM_Vd (OP_PARM_V+OP_PARM_d) 1105 #define OP_PARM_Vd_WO OP_PARM_Vd /**< Annotates write only operand. */ 1103 1106 #define OP_PARM_VdZx_WO OP_PARM_Vd /**< Annotates that the registers get their upper bits cleared */ 1104 1107 #define OP_PARM_Vdq_WO OP_PARM_Vdq /**< Annotates that only YMM/XMM[127:64] are accessed. */ -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsOneByte.cpp.h
r67003 r67006 4352 4352 { 4353 4353 pVCpu->iem.s.fPrefixes |= IEM_OP_PRF_XOP; 4354 if ( bXop2 & 0x80 /* XOP.W */)4354 if ((bXop2 & 0x80 /* XOP.W */) && pVCpu->iem.s.enmCpuMode == IEMMODE_64BIT) 4355 4355 pVCpu->iem.s.fPrefixes |= IEM_OP_PRF_SIZE_REX_W; 4356 4356 pVCpu->iem.s.uRexReg = (~bRm >> (7 - 3)) & 0x8; … … 6227 6227 uint8_t bOpcode; IEM_OPCODE_GET_NEXT_U8(&bOpcode); 6228 6228 pVCpu->iem.s.fPrefixes |= IEM_OP_PRF_VEX; 6229 if ( bVex2 & 0x80 /* VEX.W */)6229 if ((bVex2 & 0x80 /* VEX.W */) && pVCpu->iem.s.enmCpuMode == IEMMODE_64BIT) 6230 6230 pVCpu->iem.s.fPrefixes |= IEM_OP_PRF_SIZE_REX_W; 6231 6231 pVCpu->iem.s.uRexReg = (~bRm >> (7 - 3)) & 0x8; -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsPython.py
r67004 r67006 263 263 'Pq': ( 'IDX_UseModRM', 'reg', '%Pq', 'Pq', ), 264 264 'Pq_WO': ( 'IDX_UseModRM', 'reg', '%Pq', 'Pq', ), 265 'Vd_WO': ( 'IDX_UseModRM', 'reg', '%Vd', 'Vd', ), 265 266 'VdZx_WO': ( 'IDX_UseModRM', 'reg', '%Vd', 'Vd', ), 266 267 'Vss': ( 'IDX_UseModRM', 'reg', '%Vss', 'Vss', ), -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r67005 r67006 3464 3464 * @optest 64-bit / op1=1 op2=2 -> op1=2 ftw=0xff 3465 3465 * @optest 64-bit / op1=0 op2=-42 -> op1=-42 ftw=0xff 3466 * @oponly3467 3466 */ 3468 3467 IEMOP_MNEMONIC2(RM, MOVQ, movq, Pq_WO, Eq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OZ_PFX); … … 3491 3490 IEM_MC_LOCAL(uint64_t, u64Tmp); 3492 3491 3493 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT();3494 3492 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 3495 3493 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3494 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT(); 3496 3495 IEM_MC_ACTUALIZE_FPU_STATE_FOR_CHANGE(); 3497 3496 … … 3517 3516 * @optest op1=1 op2=2 -> op1=2 ftw=0xff 3518 3517 * @optest op1=0 op2=-42 -> op1=-42 ftw=0xff 3519 * @oponly3520 3518 */ 3521 3519 IEMOP_MNEMONIC2(RM, MOVD, movd, PdZx_WO, Ed, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OZ_PFX); … … 3544 3542 IEM_MC_LOCAL(uint32_t, u32Tmp); 3545 3543 3546 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT();3547 3544 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 3548 3545 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3546 IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT(); 3549 3547 IEM_MC_ACTUALIZE_FPU_STATE_FOR_CHANGE(); 3550 3548 … … 3575 3573 * @optest 64-bit / op1=1 op2=2 -> op1=2 3576 3574 * @optest 64-bit / op1=0 op2=-42 -> op1=-42 3577 * @oponly3578 3575 */ 3579 3576 IEMOP_MNEMONIC2(RM, MOVQ, movq, VqZx_WO, Eq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OZ_PFX); … … 3601 3598 IEM_MC_LOCAL(uint64_t, u64Tmp); 3602 3599 3603 IEM_MC_MAYBE_RAISE_SSE2_RELATED_XCPT(); /** @todo order */3604 3600 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 3605 3601 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3602 IEM_MC_MAYBE_RAISE_SSE2_RELATED_XCPT(); 3606 3603 IEM_MC_ACTUALIZE_SSE_STATE_FOR_CHANGE(); 3607 3604 … … 3626 3623 * @optest op1=1 op2=2 -> op1=2 3627 3624 * @optest op1=0 op2=-42 -> op1=-42 3628 * @oponly3629 3625 */ 3630 3626 IEMOP_MNEMONIC2(RM, MOVD, movd, VdZx_WO, Ed, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OZ_PFX); … … 3652 3648 IEM_MC_LOCAL(uint32_t, u32Tmp); 3653 3649 3654 IEM_MC_MAYBE_RAISE_SSE2_RELATED_XCPT(); /** @todo order */3655 3650 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 3656 3651 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 3652 IEM_MC_MAYBE_RAISE_SSE2_RELATED_XCPT(); 3657 3653 IEM_MC_ACTUALIZE_SSE_STATE_FOR_CHANGE(); 3658 3654 -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsVexMap1.cpp.h
r67003 r67006 2042 2042 /* Opcode VEX.0F 0x6e - invalid */ 2043 2043 2044 /** Opcode VEX.66.0F 0x6e - vmovd/q Vy, Ey */ 2045 FNIEMOP_STUB(iemOp_vmovd_q_Vy_Ey); 2044 FNIEMOP_DEF(iemOp_vmovd_q_Vy_Ey) 2045 { 2046 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 2047 if (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_SIZE_REX_W) 2048 { 2049 /** 2050 * @opcode 0x6e 2051 * @opcodesub rex.w=1 2052 * @oppfx 0x66 2053 * @opcpuid avx 2054 * @opgroup og_avx_simdint_datamov 2055 * @opxcpttype 5 2056 * @optest 64-bit / op1=1 op2=2 -> op1=2 2057 * @optest 64-bit / op1=0 op2=-42 -> op1=-42 2058 * @oponly 2059 */ 2060 IEMOP_MNEMONIC2(VEX_RM, VMOVQ, vmovq, Vq_WO, Eq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OZ_PFX); 2061 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 2062 { 2063 /* XMM, greg64 */ 2064 IEMOP_HLP_DONE_VEX_DECODING_L0_AND_NO_VVVV(); 2065 IEM_MC_BEGIN(0, 1); 2066 IEM_MC_LOCAL(uint64_t, u64Tmp); 2067 2068 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 2069 IEM_MC_ACTUALIZE_AVX_STATE_FOR_CHANGE(); 2070 2071 IEM_MC_FETCH_GREG_U64(u64Tmp, (bRm & X86_MODRM_RM_MASK) | pVCpu->iem.s.uRexB); 2072 IEM_MC_STORE_YREG_U64_ZX_VLMAX(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg, u64Tmp); 2073 2074 IEM_MC_ADVANCE_RIP(); 2075 IEM_MC_END(); 2076 } 2077 else 2078 { 2079 /* XMM, [mem64] */ 2080 IEM_MC_BEGIN(0, 2); 2081 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 2082 IEM_MC_LOCAL(uint64_t, u64Tmp); 2083 2084 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 2085 IEMOP_HLP_DONE_VEX_DECODING_L0_AND_NO_VVVV(); 2086 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 2087 IEM_MC_ACTUALIZE_AVX_STATE_FOR_CHANGE(); 2088 2089 IEM_MC_FETCH_MEM_U64(u64Tmp, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 2090 IEM_MC_STORE_YREG_U64_ZX_VLMAX(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg, u64Tmp); 2091 2092 IEM_MC_ADVANCE_RIP(); 2093 IEM_MC_END(); 2094 } 2095 } 2096 else 2097 { 2098 /** 2099 * @opdone 2100 * @opcode 0x6e 2101 * @opcodesub rex.w=0 2102 * @oppfx 0x66 2103 * @opcpuid avx 2104 * @opgroup og_avx_simdint_datamov 2105 * @opxcpttype 5 2106 * @opfunction iemOp_vmovd_q_Vy_Ey 2107 * @optest op1=1 op2=2 -> op1=2 2108 * @optest op1=0 op2=-42 -> op1=-42 2109 * @oponly 2110 */ 2111 IEMOP_MNEMONIC2(VEX_RM, VMOVD, vmovd, Vd_WO, Ed, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OZ_PFX); 2112 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 2113 { 2114 /* XMM, greg32 */ 2115 IEMOP_HLP_DONE_VEX_DECODING_L0_AND_NO_VVVV(); 2116 IEM_MC_BEGIN(0, 1); 2117 IEM_MC_LOCAL(uint32_t, u32Tmp); 2118 2119 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 2120 IEM_MC_ACTUALIZE_AVX_STATE_FOR_CHANGE(); 2121 2122 IEM_MC_FETCH_GREG_U32(u32Tmp, (bRm & X86_MODRM_RM_MASK) | pVCpu->iem.s.uRexB); 2123 IEM_MC_STORE_YREG_U32_ZX_VLMAX(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg, u32Tmp); 2124 2125 IEM_MC_ADVANCE_RIP(); 2126 IEM_MC_END(); 2127 } 2128 else 2129 { 2130 /* XMM, [mem32] */ 2131 IEM_MC_BEGIN(0, 2); 2132 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 2133 IEM_MC_LOCAL(uint32_t, u32Tmp); 2134 2135 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 2136 IEMOP_HLP_DONE_VEX_DECODING_L0_AND_NO_VVVV(); 2137 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 2138 IEM_MC_ACTUALIZE_AVX_STATE_FOR_CHANGE(); 2139 2140 IEM_MC_FETCH_MEM_U32(u32Tmp, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 2141 IEM_MC_STORE_YREG_U32_ZX_VLMAX(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg, u32Tmp); 2142 2143 IEM_MC_ADVANCE_RIP(); 2144 IEM_MC_END(); 2145 } 2146 } 2147 return VINF_SUCCESS; 2148 } 2149 2046 2150 2047 2151 /* Opcode VEX.F3.0F 0x6e - invalid */ -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
r67005 r67006 2581 2581 2582 2582 2583 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_VEX_MODRM_Vd_WO_Ed_WZ(PBS3CG1STATE pThis, unsigned iEncoding) 2584 { 2585 unsigned off; 2586 switch (iEncoding) 2587 { 2588 case 0: 2589 pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationReg; 2590 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/); 2591 off = Bs3Cg1InsertOpcodes(pThis, off); 2592 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0); 2593 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 0; 2594 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 1; 2595 break; 2596 case 1: 2597 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2598 off = Bs3Cg1InsertOpcodes(pThis, off); 2599 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2); 2600 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2; 2601 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6; 2602 break; 2603 case 2: 2604 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L-invalid*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2605 off = Bs3Cg1InsertOpcodes(pThis, off); 2606 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2); 2607 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2; 2608 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6; 2609 pThis->fInvalidEncoding = true; 2610 break; 2611 case 3: 2612 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xe /*~V-invalid*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2613 off = Bs3Cg1InsertOpcodes(pThis, off); 2614 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2); 2615 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2; 2616 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6; 2617 pThis->fInvalidEncoding = true; 2618 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0; 2619 break; 2620 #if ARCH_BITS == 64 2621 case 4: 2622 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/, 1 /*~X*/, 0 /*~B*/, 0 /*W*/); 2623 off = Bs3Cg1InsertOpcodes(pThis, off); 2624 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2); 2625 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2 + 8; 2626 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6 + 8; 2627 break; 2628 #endif 2629 case 5: 2630 pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationMem; 2631 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/); 2632 off = Bs3Cg1InsertOpcodes(pThis, off); 2633 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/); 2634 break; 2635 case 6: 2636 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2637 off = Bs3Cg1InsertOpcodes(pThis, off); 2638 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/); 2639 break; 2640 case 7: 2641 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2642 off = Bs3Cg1InsertOpcodes(pThis, off); 2643 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 1 /*cbMisalign*/); 2644 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 2 : 0; 2645 break; 2646 #if ARCH_BITS == 64 2647 case 8: 2648 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2649 off = Bs3Cg1InsertOpcodes(pThis, off); 2650 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4+8 /*iReg*/, 0 /*cbMisalign*/); 2651 break; 2652 case 9: 2653 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/); 2654 off = Bs3Cg1InsertOpcodes(pThis, off); 2655 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5+8 /*iReg*/, 0 /*cbMisalign*/); 2656 iEncoding += 2; 2657 break; 2658 #endif 2659 case 10: /* VEX.W is ignored in 32-bit mode. flag? */ 2660 BS3_ASSERT(!BS3CG1_IS_64BIT_TARGET(pThis)); 2661 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2662 off = Bs3Cg1InsertOpcodes(pThis, off); 2663 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/); 2664 break; 2665 2666 default: 2667 return 0; 2668 } 2669 pThis->cbCurInstr = off; 2670 return iEncoding + 1; 2671 } 2672 2673 2674 /* Differs from Bs3Cg1EncodeNext_MODRM_Pq_WO_Eq_WNZ in that REX.R isn't ignored. */ 2675 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_VEX_MODRM_Vq_WO_Eq_WNZ(PBS3CG1STATE pThis, unsigned iEncoding) 2676 { 2677 #if ARCH_BITS == 64 2678 if (BS3CG1_IS_64BIT_TARGET(pThis)) 2679 { 2680 unsigned off; 2681 switch (iEncoding) 2682 { 2683 case 0: 2684 pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationReg; 2685 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2686 off = Bs3Cg1InsertOpcodes(pThis, off); 2687 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2); 2688 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2; 2689 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6; 2690 break; 2691 case 1: 2692 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 1 /*L-invalid*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2693 off = Bs3Cg1InsertOpcodes(pThis, off); 2694 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2); 2695 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2; 2696 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6; 2697 pThis->fInvalidEncoding = true; 2698 break; 2699 case 2: 2700 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xe /*~V-invalid*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2701 off = Bs3Cg1InsertOpcodes(pThis, off); 2702 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2); 2703 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2; 2704 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6; 2705 pThis->fInvalidEncoding = true; 2706 break; 2707 case 3: 2708 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/, 1 /*~X*/, 0 /*~B*/, 1 /*W*/); 2709 off = Bs3Cg1InsertOpcodes(pThis, off); 2710 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2); 2711 pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2 + 8; 2712 pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6 + 8; 2713 break; 2714 case 4: 2715 pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationMem; 2716 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2717 off = Bs3Cg1InsertOpcodes(pThis, off); 2718 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/); 2719 break; 2720 case 5: 2721 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2722 off = Bs3Cg1InsertOpcodes(pThis, off); 2723 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 1 /*cbMisalign*/); 2724 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 2 : 0; 2725 break; 2726 case 6: 2727 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, 0 /*L*/, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W*/); 2728 off = Bs3Cg1InsertOpcodes(pThis, off); 2729 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4+8 /*iReg*/, 0 /*cbMisalign*/); 2730 break; 2731 2732 default: 2733 return 0; 2734 } 2735 pThis->cbCurInstr = off; 2736 return iEncoding + 1; 2737 } 2738 #endif 2739 return 0; 2740 } 2741 2742 2583 2743 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_VEX_MODRM_Vps_WO_Wps__OR__VEX_MODRM_Vpd_WO_Wpd(PBS3CG1STATE pThis, unsigned iEncoding) 2584 2744 { … … 4203 4363 4204 4364 #ifdef BS3CG1_WITH_VEX 4365 4366 case BS3CG1ENC_VEX_MODRM_Vd_WO_Ed_WZ: 4367 pThis->pfnEncoder = Bs3Cg1EncodeNext_VEX_MODRM_Vd_WO_Ed_WZ; 4368 pThis->iRegOp = 0; 4369 pThis->iRmOp = 1; 4370 pThis->aOperands[0].cbOp = 4; 4371 pThis->aOperands[1].cbOp = 4; 4372 pThis->aOperands[0].idxFieldBase = BS3CG1DST_XMM0_DW0_ZX; 4373 pThis->aOperands[1].idxFieldBase = BS3CG1DST_EAX; 4374 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX_ZX_VLMAX; 4375 pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX; 4376 pThis->aOperands[1].enmLocationReg = BS3CG1OPLOC_CTX; 4377 pThis->aOperands[1].enmLocationMem = BS3CG1OPLOC_MEM; 4378 break; 4379 4380 case BS3CG1ENC_VEX_MODRM_Vq_WO_Eq_WNZ: 4381 pThis->pfnEncoder = Bs3Cg1EncodeNext_VEX_MODRM_Vq_WO_Eq_WNZ; 4382 pThis->iRegOp = 0; 4383 pThis->iRmOp = 1; 4384 pThis->aOperands[0].cbOp = 8; 4385 pThis->aOperands[1].cbOp = 8; 4386 pThis->aOperands[0].idxFieldBase = BS3CG1DST_XMM0_LO_ZX; 4387 pThis->aOperands[1].idxFieldBase = BS3CG1DST_RAX; 4388 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX_ZX_VLMAX; 4389 pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX; 4390 pThis->aOperands[1].enmLocationReg = BS3CG1OPLOC_CTX; 4391 pThis->aOperands[1].enmLocationMem = BS3CG1OPLOC_MEM; 4392 break; 4205 4393 4206 4394 case BS3CG1ENC_VEX_MODRM_Vps_WO_Wps: -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h
r67004 r67006 78 78 BS3CG1OP_Usd, 79 79 BS3CG1OP_Usd_WO, 80 BS3CG1OP_Vd_WO, 80 81 BS3CG1OP_VdZx_WO, 81 82 BS3CG1OP_Vss, … … 165 166 BS3CG1ENC_MODRM_Mpd_WO_Vpd, 166 167 168 BS3CG1ENC_VEX_MODRM_Vd_WO_Ed_WZ, 167 169 BS3CG1ENC_VEX_MODRM_Vps_WO_Wps, 168 170 BS3CG1ENC_VEX_MODRM_Vpd_WO_Wpd, 169 171 BS3CG1ENC_VEX_MODRM_Vss_WO_HssHi_Uss, 170 172 BS3CG1ENC_VEX_MODRM_Vsd_WO_HsdHi_Usd, 173 BS3CG1ENC_VEX_MODRM_Vq_WO_Eq_WNZ, 171 174 BS3CG1ENC_VEX_MODRM_Vq_WO_HqHi_UqHi, 172 175 BS3CG1ENC_VEX_MODRM_Vq_WO_HqHi_Mq,
Note:
See TracChangeset
for help on using the changeset viewer.