Changeset 66992 in vbox
- Timestamp:
- May 19, 2017 10:25:58 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 115545
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/disopcode.h
r66991 r66992 787 787 OP_VMOVAPS, 788 788 OP_VMOVAPD, 789 OP_VMOVNTPS, 790 OP_VMOVNTPD, 789 791 /** @} */ 790 792 OP_END_OF_OPCODES -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsVexMap1.cpp.h
r66978 r66992 1356 1356 { 1357 1357 IEMOP_MNEMONIC2(VEX_MR, VMOVAPD, vmovapd, Wpd_WO, Vpd, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE); 1358 Assert(pVCpu->iem.s.uVexLength <= 1); 1358 1359 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1359 Assert(pVCpu->iem.s.uVexLength <= 1);1360 1360 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 1361 1361 { … … 1450 1450 1451 1451 1452 /** Opcode VEX.0F 0x2b - vmovntps Mps, Vps */ 1453 FNIEMOP_STUB(iemOp_vmovntps_Mps_Vps); 1454 //FNIEMOP_DEF(iemOp_vmovntps_Mps_Vps) 1455 //{ 1456 // IEMOP_MNEMONIC(vmovntps_Mps_Vps, "movntps Mps,Vps"); 1457 // uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1458 // if ((bRm & X86_MODRM_MOD_MASK) != (3 << X86_MODRM_MOD_SHIFT)) 1459 // { 1460 // /* 1461 // * memory, register. 1462 // */ 1463 // IEM_MC_BEGIN(0, 2); 1464 // IEM_MC_LOCAL(RTUINT128U, uSrc); /** @todo optimize this one day... */ 1465 // IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 1466 // 1467 // IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 1468 // IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 1469 // IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 1470 // IEM_MC_ACTUALIZE_SSE_STATE_FOR_CHANGE(); 1471 // 1472 // IEM_MC_FETCH_XREG_U128(uSrc, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg); 1473 // IEM_MC_STORE_MEM_U128_ALIGN_SSE(pVCpu->iem.s.iEffSeg, GCPtrEffSrc, uSrc); 1474 // 1475 // IEM_MC_ADVANCE_RIP(); 1476 // IEM_MC_END(); 1477 // } 1478 // /* The register, register encoding is invalid. */ 1479 // else 1480 // return IEMOP_RAISE_INVALID_OPCODE(); 1481 // return VINF_SUCCESS; 1482 //} 1483 1484 /** Opcode VEX.66.0F 0x2b - vmovntpd Mpd, Vpd */ 1485 FNIEMOP_STUB(iemOp_vmovntpd_Mpd_Vpd); 1486 //FNIEMOP_DEF(iemOp_vmovntpd_Mpd_Vpd) 1487 //{ 1488 // IEMOP_MNEMONIC(vmovntpd_Mpd_Vpd, "movntpd Mdq,Vpd"); 1489 // uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1490 // if ((bRm & X86_MODRM_MOD_MASK) != (3 << X86_MODRM_MOD_SHIFT)) 1491 // { 1492 // /* 1493 // * memory, register. 1494 // */ 1495 // IEM_MC_BEGIN(0, 2); 1496 // IEM_MC_LOCAL(RTUINT128U, uSrc); /** @todo optimize this one day... */ 1497 // IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 1498 // 1499 // IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 1500 // IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 1501 // IEM_MC_MAYBE_RAISE_SSE2_RELATED_XCPT(); 1502 // IEM_MC_ACTUALIZE_SSE_STATE_FOR_CHANGE(); 1503 // 1504 // IEM_MC_FETCH_XREG_U128(uSrc, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg); 1505 // IEM_MC_STORE_MEM_U128_ALIGN_SSE(pVCpu->iem.s.iEffSeg, GCPtrEffSrc, uSrc); 1506 // 1507 // IEM_MC_ADVANCE_RIP(); 1508 // IEM_MC_END(); 1509 // } 1510 // /* The register, register encoding is invalid. */ 1511 // else 1512 // return IEMOP_RAISE_INVALID_OPCODE(); 1513 // return VINF_SUCCESS; 1514 //} 1515 /* Opcode VEX.F3.0F 0x2b - invalid */ 1516 /* Opcode VEX.F2.0F 0x2b - invalid */ 1452 /** 1453 * @opcode 0x2b 1454 * @opcodesub !11 mr/reg 1455 * @oppfx none 1456 * @opcpuid avx 1457 * @opgroup og_avx_cachect 1458 * @opxcpttype 1 1459 * @optest op1=1 op2=2 -> op1=2 1460 * @optest op1=0 op2=-42 -> op1=-42 1461 * @oponly 1462 * @note Identical implementation to vmovntpd 1463 */ 1464 FNIEMOP_DEF(iemOp_vmovntps_Mps_Vps) 1465 { 1466 IEMOP_MNEMONIC2(VEX_MR_MEM, VMOVNTPS, vmovntps, Mps_WO, Vps, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE); 1467 Assert(pVCpu->iem.s.uVexLength <= 1); 1468 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1469 if ((bRm & X86_MODRM_MOD_MASK) != (3 << X86_MODRM_MOD_SHIFT)) 1470 { 1471 /* 1472 * memory, register. 1473 */ 1474 if (pVCpu->iem.s.uVexLength == 0) 1475 { 1476 IEM_MC_BEGIN(0, 2); 1477 IEM_MC_LOCAL(RTUINT128U, uSrc); 1478 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 1479 1480 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 1481 IEMOP_HLP_DONE_VEX_DECODING_NO_VVVV(); 1482 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 1483 IEM_MC_ACTUALIZE_AVX_STATE_FOR_CHANGE(); 1484 1485 IEM_MC_FETCH_XREG_U128(uSrc, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg); 1486 IEM_MC_STORE_MEM_U128_ALIGN_SSE(pVCpu->iem.s.iEffSeg, GCPtrEffSrc, uSrc); 1487 1488 IEM_MC_ADVANCE_RIP(); 1489 IEM_MC_END(); 1490 } 1491 else 1492 { 1493 IEM_MC_BEGIN(0, 2); 1494 IEM_MC_LOCAL(RTUINT256U, uSrc); 1495 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 1496 1497 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 1498 IEMOP_HLP_DONE_VEX_DECODING_NO_VVVV(); 1499 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 1500 IEM_MC_ACTUALIZE_AVX_STATE_FOR_CHANGE(); 1501 1502 IEM_MC_FETCH_YREG_U256(uSrc, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg); 1503 IEM_MC_STORE_MEM_U256_ALIGN_AVX(pVCpu->iem.s.iEffSeg, GCPtrEffSrc, uSrc); 1504 1505 IEM_MC_ADVANCE_RIP(); 1506 IEM_MC_END(); 1507 } 1508 } 1509 /* The register, register encoding is invalid. */ 1510 else 1511 return IEMOP_RAISE_INVALID_OPCODE(); 1512 return VINF_SUCCESS; 1513 } 1514 1515 /** 1516 * @opcode 0x2b 1517 * @opcodesub !11 mr/reg 1518 * @oppfx 0x66 1519 * @opcpuid avx 1520 * @opgroup og_avx_cachect 1521 * @opxcpttype 1 1522 * @optest op1=1 op2=2 -> op1=2 1523 * @optest op1=0 op2=-42 -> op1=-42 1524 * @oponly 1525 * @note Identical implementation to vmovntps 1526 */ 1527 FNIEMOP_DEF(iemOp_vmovntpd_Mpd_Vpd) 1528 { 1529 IEMOP_MNEMONIC2(VEX_MR_MEM, VMOVNTPD, vmovntpd, Mpd_WO, Vpd, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE); 1530 Assert(pVCpu->iem.s.uVexLength <= 1); 1531 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1532 if ((bRm & X86_MODRM_MOD_MASK) != (3 << X86_MODRM_MOD_SHIFT)) 1533 { 1534 /* 1535 * memory, register. 1536 */ 1537 if (pVCpu->iem.s.uVexLength == 0) 1538 { 1539 IEM_MC_BEGIN(0, 2); 1540 IEM_MC_LOCAL(RTUINT128U, uSrc); 1541 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 1542 1543 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 1544 IEMOP_HLP_DONE_VEX_DECODING_NO_VVVV(); 1545 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 1546 IEM_MC_ACTUALIZE_AVX_STATE_FOR_CHANGE(); 1547 1548 IEM_MC_FETCH_XREG_U128(uSrc, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg); 1549 IEM_MC_STORE_MEM_U128_ALIGN_SSE(pVCpu->iem.s.iEffSeg, GCPtrEffSrc, uSrc); 1550 1551 IEM_MC_ADVANCE_RIP(); 1552 IEM_MC_END(); 1553 } 1554 else 1555 { 1556 IEM_MC_BEGIN(0, 2); 1557 IEM_MC_LOCAL(RTUINT256U, uSrc); 1558 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 1559 1560 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 1561 IEMOP_HLP_DONE_VEX_DECODING_NO_VVVV(); 1562 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 1563 IEM_MC_ACTUALIZE_AVX_STATE_FOR_CHANGE(); 1564 1565 IEM_MC_FETCH_YREG_U256(uSrc, ((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg); 1566 IEM_MC_STORE_MEM_U256_ALIGN_AVX(pVCpu->iem.s.iEffSeg, GCPtrEffSrc, uSrc); 1567 1568 IEM_MC_ADVANCE_RIP(); 1569 IEM_MC_END(); 1570 } 1571 } 1572 /* The register, register encoding is invalid. */ 1573 else 1574 return IEMOP_RAISE_INVALID_OPCODE(); 1575 return VINF_SUCCESS; 1576 } 1577 1578 /** 1579 * @opmnemonic udvexf30f2b 1580 * @opcode 0x2b 1581 * @oppfx 0xf3 1582 * @opunused vex.modrm 1583 * @opcpuid avx 1584 * @optest -> 1585 * @oponly 1586 * @opdone 1587 */ 1588 1589 /** 1590 * @opmnemonic udvexf20f2b 1591 * @opcode 0x2b 1592 * @oppfx 0xf2 1593 * @opunused vex.modrm 1594 * @opcpuid avx 1595 * @optest -> 1596 * @oponly 1597 * @opdone 1598 */ 1517 1599 1518 1600 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
r66991 r66992 2730 2730 /** 2731 2731 * Wip - VEX.W ignored. 2732 */ 2733 static unsigned BS3_NEAR_CODE 2734 Bs3Cg1EncodeNext_VEX_MODRM_VsomethingWO_Msomething_Wip_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding) 2735 { 2736 unsigned off; 2737 switch (iEncoding) 2738 { 2739 case 20: /* Switch to 256-bit operands. */ 2740 pThis->aOperands[pThis->iRegOp].idxFieldBase = BS3CG1DST_YMM0; 2741 pThis->aOperands[pThis->iRegOp].cbOp = 32; 2742 pThis->aOperands[pThis->iRmOp ].cbOp = 32; 2743 /* fall thru */ 2744 case 0: 2745 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/); 2746 off = Bs3Cg1InsertOpcodes(pThis, off); 2747 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0); 2748 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0; 2749 break; 2750 #if ARCH_BITS == 64 2751 case 1: 2752 case 21: 2753 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 0 /*~R*/); 2754 off = Bs3Cg1InsertOpcodes(pThis, off); 2755 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 + 8, 0); 2756 break; 2757 #endif 2758 case 2: 2759 case 22: 2760 off = Bs3Cg1InsertVex2bPrefix(pThis, 0 /*offDst*/, 0xe /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/); 2761 off = Bs3Cg1InsertOpcodes(pThis, off); 2762 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 0, 0); 2763 pThis->fInvalidEncoding = true; 2764 break; 2765 case 3: 2766 case 23: 2767 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2768 off = Bs3Cg1InsertOpcodes(pThis, off); 2769 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0); 2770 break; 2771 case 4: 2772 case 24: 2773 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 1 /*W-ignored*/); 2774 off = Bs3Cg1InsertOpcodes(pThis, off); 2775 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0); 2776 iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 3 : 0; 2777 break; 2778 #if ARCH_BITS == 64 2779 case 5: 2780 case 25: 2781 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 0 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2782 off = Bs3Cg1InsertOpcodes(pThis, off); 2783 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5+8, 0); 2784 break; 2785 case 6: 2786 case 26: 2787 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 0 /*~B-ignored*/, 0 /*W*/); 2788 off = Bs3Cg1InsertOpcodes(pThis, off); 2789 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 1, 0); 2790 break; 2791 case 7: 2792 case 27: 2793 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0xf /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 0 /*~X-ignored*/, 1 /*~B*/, 0 /*W*/); 2794 off = Bs3Cg1InsertOpcodes(pThis, off); 2795 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0); 2796 break; 2797 #endif 2798 case 8: 2799 case 28: 2800 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 0 /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2801 off = Bs3Cg1InsertOpcodes(pThis, off); 2802 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 5, 0); 2803 pThis->fInvalidEncoding = true; 2804 break; 2805 case 9: 2806 case 29: 2807 off = Bs3Cg1InsertVex3bPrefix(pThis, 0 /*offDst*/, 7 /*~V*/, iEncoding >= 20 /*L*/, 1 /*~R*/, 1 /*~X*/, 1 /*~B*/, 0 /*W*/); 2808 off = Bs3Cg1InsertOpcodes(pThis, off); 2809 off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 2, 0); 2810 pThis->fInvalidEncoding = true; 2811 iEncoding += 10; 2812 break; 2813 2814 default: 2815 return 0; 2816 } 2817 pThis->cbCurInstr = off; 2818 return iEncoding + 1; 2819 } 2820 2821 2822 2823 /** 2824 * Wip - VEX.W ignored. 2732 2825 * Lig - VEX.L ignored. 2733 2826 */ … … 3921 4014 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_MEM_WO; 3922 4015 pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX; 3923 pThis->aOperands[0].idxFieldBase = BS3CG1DST_INVALID;3924 4016 pThis->aOperands[1].idxFieldBase = BS3CG1DST_XMM0_LO; 3925 4017 break; … … 3935 4027 pThis->aOperands[0].idxFieldBase = BS3CG1DST_INVALID; 3936 4028 pThis->aOperands[1].idxFieldBase = BS3CG1DST_XMM0_LO; 4029 break; 4030 4031 case BS3CG1ENC_VEX_MODRM_Mps_WO_Vps: 4032 case BS3CG1ENC_VEX_MODRM_Mpd_WO_Vpd: 4033 pThis->pfnEncoder = Bs3Cg1EncodeNext_VEX_MODRM_VsomethingWO_Msomething_Wip_OR_ViceVersa; 4034 pThis->iRmOp = 0; 4035 pThis->iRegOp = 1; 4036 pThis->aOperands[0].cbOp = 16; 4037 pThis->aOperands[1].cbOp = 16; 4038 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_MEM_WO; 4039 pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX; 4040 pThis->aOperands[1].idxFieldBase = BS3CG1DST_XMM0; 3937 4041 break; 3938 4042 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h
r66991 r66992 168 168 BS3CG1ENC_VEX_MODRM_Md_WO_Vss, 169 169 BS3CG1ENC_VEX_MODRM_Mq_WO_Vsd, 170 BS3CG1ENC_VEX_MODRM_Mps_WO_Vps, 171 BS3CG1ENC_VEX_MODRM_Mpd_WO_Vpd, 170 172 BS3CG1ENC_VEX_MODRM_Uss_WO_HssHi_Vss, 171 173 BS3CG1ENC_VEX_MODRM_Usd_WO_HsdHi_Vsd,
Note:
See TracChangeset
for help on using the changeset viewer.