Changeset 66464 in vbox
- Timestamp:
- Apr 6, 2017 7:22:01 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/disopcode.h
r66457 r66464 1066 1066 #define OP_PARM_UqHi OP_PARM_Uq 1067 1067 #define OP_PARM_WqZxReg OP_PARM_Wq /**< Annotates that register targets get their upper bits cleared. */ 1068 #define OP_PARM_VssZxReg OP_PARM_Vss /**< Annotates that register targets get their upper bits cleared. */ 1068 1069 #define OP_PARM_MbRO OP_PARM_Mb /**< Annotates read only memory byte operand. */ 1069 1070 #define OP_PARM_MdRO OP_PARM_Md /**< Annotates read only memory byte operand. */ -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsPython.py
r66462 r66464 241 241 'Gv': ( 'IDX_UseModRM', 'reg', '%Gv', 'Gv', ), 242 242 'Vss': ( 'IDX_UseModRM', 'reg', '%Vss', 'Vss', ), 243 'VssZxReg': ( 'IDX_UseModRM', 'reg', '%Vss', 'Vss', ), 243 244 'Vsd': ( 'IDX_UseModRM', 'reg', '%Vsd', 'Vsd', ), 244 245 'Vps': ( 'IDX_UseModRM', 'reg', '%Vps', 'Vps', ), -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r66463 r66464 1070 1070 /** Opcode 0x66 0x0f 0x10 - vmovupd Vpd, Wpd */ 1071 1071 FNIEMOP_STUB(iemOp_vmovupd_Vpd_Wpd); 1072 /** Opcode 0xf3 0x0f 0x10 - vmovss Vx, Hx, Wss */ 1073 FNIEMOP_STUB(iemOp_vmovss_Vx_Hx_Wss); //NEXT!! 1072 1073 1074 /** 1075 * @opcode 0x10 1076 * @oppfx 0xf3 1077 * @opcpuid sse 1078 * @opgroup og_sse_simdfp_datamove 1079 * @opxcpttype 5 1080 * @optest op1=1 op2=2 -> op1=2 1081 * @optest op1=0 op2=-22 -> op1=-22 1082 * @oponly 1083 */ 1084 FNIEMOP_DEF(iemOp_movss_Vss_Wss) 1085 { 1086 IEMOP_MNEMONIC2(RM, MOVSS, movss, VssZxReg, Wss, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE); 1087 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1088 if ((bRm & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT)) 1089 { 1090 /* 1091 * Register, register. 1092 */ 1093 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 1094 IEM_MC_BEGIN(0, 1); 1095 IEM_MC_LOCAL(uint32_t, uSrc); 1096 1097 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 1098 IEM_MC_ACTUALIZE_SSE_STATE_FOR_CHANGE(); 1099 IEM_MC_FETCH_XREG_U32(uSrc, (bRm & X86_MODRM_RM_MASK) | pVCpu->iem.s.uRexB); 1100 IEM_MC_STORE_XREG_U32(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg, uSrc); 1101 1102 IEM_MC_ADVANCE_RIP(); 1103 IEM_MC_END(); 1104 } 1105 else 1106 { 1107 /* 1108 * Memory, register. 1109 */ 1110 IEM_MC_BEGIN(0, 2); 1111 IEM_MC_LOCAL(uint32_t, uSrc); 1112 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 1113 1114 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 1115 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 1116 IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT(); 1117 IEM_MC_ACTUALIZE_SSE_STATE_FOR_CHANGE(); 1118 1119 IEM_MC_FETCH_MEM_U32(uSrc, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 1120 IEM_MC_STORE_XREG_U32_ZX_U128(((bRm >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | pVCpu->iem.s.uRexReg, uSrc); 1121 1122 IEM_MC_ADVANCE_RIP(); 1123 IEM_MC_END(); 1124 } 1125 return VINF_SUCCESS; 1126 } 1127 1128 1129 /** Opcode VEX 0xf3 0x0f 0x10 - vmovsd Vx, Hx, Wsd */ 1130 FNIEMOP_STUB(iemOp_vmovss_Vx_Hx_Wss); 1131 1074 1132 /** Opcode 0xf2 0x0f 0x10 - vmovsd Vx, Hx, Wsd */ 1075 1133 FNIEMOP_STUB(iemOp_vmovsd_Vx_Hx_Wsd); … … 8368 8426 /* 0x0f */ IEMOP_X4(iemOp_3Dnow), 8369 8427 8370 /* 0x10 */ iemOp_vmovups_Vps_Wps, iemOp_vmovupd_Vpd_Wpd, iemOp_ vmovss_Vx_Hx_Wss,iemOp_vmovsd_Vx_Hx_Wsd,8428 /* 0x10 */ iemOp_vmovups_Vps_Wps, iemOp_vmovupd_Vpd_Wpd, iemOp_movss_Vss_Wss, iemOp_vmovsd_Vx_Hx_Wsd, 8371 8429 /* 0x11 */ iemOp_vmovups_Wps_Vps, iemOp_vmovupd_Wpd_Vpd, iemOp_vmovss_Wss_Hx_Vss, iemOp_vmovsd_Wsd_Hx_Vsd, 8372 8430 /* 0x12 */ iemOp_vmovlps_Vq_Hq_Mq__vmovhlps, iemOp_vmovlpd_Vq_Hq_Mq, iemOp_vmovsldup_Vx_Wx, iemOp_vmovddup_Vx_Wx, -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
r66463 r66464 513 513 /* [BS3CG1DST_XMM14_DW0] = */ 4, 514 514 /* [BS3CG1DST_XMM15_DW0] = */ 4, 515 /* [BS3CG1DST_XMM0_DW0_ZX] = */ 4, 516 /* [BS3CG1DST_XMM1_DW0_ZX] = */ 4, 517 /* [BS3CG1DST_XMM2_DW0_ZX] = */ 4, 518 /* [BS3CG1DST_XMM3_DW0_ZX] = */ 4, 519 /* [BS3CG1DST_XMM4_DW0_ZX] = */ 4, 520 /* [BS3CG1DST_XMM5_DW0_ZX] = */ 4, 521 /* [BS3CG1DST_XMM6_DW0_ZX] = */ 4, 522 /* [BS3CG1DST_XMM7_DW0_ZX] = */ 4, 523 /* [BS3CG1DST_XMM8_DW0_ZX] = */ 4, 524 /* [BS3CG1DST_XMM9_DW0_ZX] = */ 4, 525 /* [BS3CG1DST_XMM10_DW0_ZX] =*/ 4, 526 /* [BS3CG1DST_XMM11_DW0_ZX] =*/ 4, 527 /* [BS3CG1DST_XMM12_DW0_ZX] =*/ 4, 528 /* [BS3CG1DST_XMM13_DW0_ZX] =*/ 4, 529 /* [BS3CG1DST_XMM14_DW0_ZX] =*/ 4, 530 /* [BS3CG1DST_XMM15_DW0_ZX] =*/ 4, 515 531 /* [BS3CG1DST_YMM0] = */ 32, 516 532 /* [BS3CG1DST_YMM1] = */ 32, … … 745 761 /* [BS3CG1DST_XMM14_DW0] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[14]), 746 762 /* [BS3CG1DST_XMM15_DW0] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[15]), 763 /* [BS3CG1DST_XMM0_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[0]), 764 /* [BS3CG1DST_XMM1_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[1]), 765 /* [BS3CG1DST_XMM2_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[2]), 766 /* [BS3CG1DST_XMM3_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[3]), 767 /* [BS3CG1DST_XMM4_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[4]), 768 /* [BS3CG1DST_XMM5_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[5]), 769 /* [BS3CG1DST_XMM6_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[6]), 770 /* [BS3CG1DST_XMM7_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[7]), 771 /* [BS3CG1DST_XMM8_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[8]), 772 /* [BS3CG1DST_XMM9_DW0_ZX] = */ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[9]), 773 /* [BS3CG1DST_XMM10_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[10]), 774 /* [BS3CG1DST_XMM11_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[11]), 775 /* [BS3CG1DST_XMM12_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[12]), 776 /* [BS3CG1DST_XMM13_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[13]), 777 /* [BS3CG1DST_XMM14_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[14]), 778 /* [BS3CG1DST_XMM15_DW0_ZX] =*/ sizeof(BS3REGCTX) + RT_OFFSETOF(BS3EXTCTX, Ctx.x87.aXMM[15]), 747 779 748 780 /* [BS3CG1DST_YMM0] = */ ~0U, … … 977 1009 { "XMM14_DW0" }, 978 1010 { "XMM15_DW0" }, 1011 { "XMM0_DW0_ZX" }, 1012 { "XMM1_DW0_ZX" }, 1013 { "XMM2_DW0_ZX" }, 1014 { "XMM3_DW0_ZX" }, 1015 { "XMM4_DW0_ZX" }, 1016 { "XMM5_DW0_ZX" }, 1017 { "XMM6_DW0_ZX" }, 1018 { "XMM7_DW0_ZX" }, 1019 { "XMM8_DW0_ZX" }, 1020 { "XMM9_DW0_ZX" }, 1021 { "XMM10_DW0_ZX" }, 1022 { "XMM11_DW0_ZX" }, 1023 { "XMM12_DW0_ZX" }, 1024 { "XMM13_DW0_ZX" }, 1025 { "XMM14_DW0_ZX" }, 1026 { "XMM15_DW0_ZX" }, 979 1027 { "YMM0" }, 980 1028 { "YMM1" }, … … 1612 1660 1613 1661 1662 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_VssZxReg_Wss(PBS3CG1STATE pThis, unsigned iEncoding) 1663 { 1664 unsigned off; 1665 if (iEncoding == 0) 1666 { 1667 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1668 pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 1, 0); 1669 pThis->aOperands[pThis->iRmOp ].idxField = BS3CG1DST_XMM0_LO; 1670 pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM1_DW0_ZX; 1671 } 1672 else if (iEncoding == 1) 1673 { 1674 pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM2_DW0_ZX; 1675 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1676 off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2 /*iReg*/, 4, 0, BS3CG1OPLOC_MEM); 1677 } 1678 else if (iEncoding == 2) 1679 { 1680 pThis->aOperands[pThis->iRegOp].idxField = BS3CG1DST_XMM3_DW0_ZX; 1681 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)); 1682 off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 3 /*iReg*/, 4, 1 /*cbMissalign*/, BS3CG1OPLOC_MEM); 1683 } 1684 else 1685 return 0; 1686 pThis->cbCurInstr = off; 1687 return iEncoding + 1; 1688 } 1689 1690 1614 1691 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_Gv_Ma(PBS3CG1STATE pThis, unsigned iEncoding) 1615 1692 { … … 1992 2069 case BS3CG1ENC_MODRM_Vdq_Wdq: 1993 2070 return Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_Vdq_Wdq(pThis, iEncoding); 2071 case BS3CG1ENC_MODRM_VssZxReg_Wss: 2072 return Bs3Cg1EncodeNext_BS3CG1ENC_MODRM_VssZxReg_Wss(pThis, iEncoding); 1994 2073 1995 2074 case BS3CG1ENC_MODRM_Gv_Ma: … … 2154 2233 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX; 2155 2234 pThis->aOperands[1].enmLocation = BS3CG1OPLOC_MEM; 2235 break; 2236 2237 case BS3CG1ENC_MODRM_VssZxReg_Wss: 2238 pThis->iRmOp = 1; 2239 pThis->iRegOp = 0; 2240 pThis->aOperands[0].cbOp = 4; 2241 pThis->aOperands[1].cbOp = 4; 2242 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_CTX; 2243 pThis->aOperands[1].enmLocation = BS3CG1OPLOC_CTX; 2156 2244 break; 2157 2245 … … 2787 2875 2788 2876 case 4: 2789 if (offField <= RT_OFFSETOF(BS3REGCTX, r15)) /* Clear the top dword. */ 2877 if ((unsigned)(idxField - BS3CG1DST_XMM0_DW0_ZX) <= (unsigned)(BS3CG1DST_XMM15_DW0_ZX - BS3CG1DST_XMM0_DW0_ZX)) 2878 { 2879 PtrField.pu32[1] = 0; 2880 PtrField.pu64[1] = 0; 2881 } 2882 else if (offField <= RT_OFFSETOF(BS3REGCTX, r15)) /* Clear the top dword. */ 2790 2883 PtrField.pu32[1] = 0; 2791 2884 switch (bOpcode & BS3CG1_CTXOP_OPERATOR_MASK) … … 3085 3178 if ( pResult->Ctx.x87.aXMM[i].au64[0] != pExpect->Ctx.x87.aXMM[i].au64[0] 3086 3179 || pResult->Ctx.x87.aXMM[i].au64[1] != pExpect->Ctx.x87.aXMM[i].au64[1]) 3087 fOkay = Bs3TestFailedF("XMM%u: %#010RX64'%08RX64, expected %#010RX64'%08RX64", i, 3180 fOkay = Bs3TestFailedF("XMM%u: %#010RX64'%016RX64, expected %#010RX64'%08RX64", i, 3181 pResult->Ctx.x87.aXMM[i].au64[1], 3088 3182 pResult->Ctx.x87.aXMM[i].au64[0], 3089 pResult->Ctx.x87.aXMM[i].au64[1], 3090 pExpect->Ctx.x87.aXMM[i].au64[0], 3091 pExpect->Ctx.x87.aXMM[i].au64[1]); 3183 pExpect->Ctx.x87.aXMM[i].au64[1], 3184 pExpect->Ctx.x87.aXMM[i].au64[0]); 3092 3185 } 3093 3186 else … … 3713 3806 #if 0 3714 3807 /* (for debugging) */ 3715 if (bMode < BS3_MODE_LM16)3808 if (bMode != BS3_MODE_PP32) 3716 3809 return BS3TESTDOMODE_SKIPPED; 3717 3810 #endif … … 3726 3819 #if 0 3727 3820 /* (for debugging) */ 3728 if (bMode >= BS3_MODE_LM64)3821 //if (bMode == BS3_MODE_PP32) 3729 3822 { 3730 3823 Bs3TestTerm(); -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h
r66462 r66464 56 56 BS3CG1OP_UqHi, 57 57 BS3CG1OP_Vss, 58 BS3CG1OP_VssZxReg, 58 59 BS3CG1OP_Vsd, 59 60 BS3CG1OP_Vps, … … 104 105 BS3CG1ENC_MODRM_Vq_Mq, 105 106 BS3CG1ENC_MODRM_Vdq_Wdq, 107 BS3CG1ENC_MODRM_VssZxReg_Wss, 106 108 BS3CG1ENC_MODRM_MbRO, 107 109 BS3CG1ENC_MODRM_MdRO, … … 532 534 BS3CG1DST_XMM14_DW0, 533 535 BS3CG1DST_XMM15_DW0, 536 BS3CG1DST_XMM0_DW0_ZX, 537 BS3CG1DST_XMM1_DW0_ZX, 538 BS3CG1DST_XMM2_DW0_ZX, 539 BS3CG1DST_XMM3_DW0_ZX, 540 BS3CG1DST_XMM4_DW0_ZX, 541 BS3CG1DST_XMM5_DW0_ZX, 542 BS3CG1DST_XMM6_DW0_ZX, 543 BS3CG1DST_XMM7_DW0_ZX, 544 BS3CG1DST_XMM8_DW0_ZX, 545 BS3CG1DST_XMM9_DW0_ZX, 546 BS3CG1DST_XMM10_DW0_ZX, 547 BS3CG1DST_XMM11_DW0_ZX, 548 BS3CG1DST_XMM12_DW0_ZX, 549 BS3CG1DST_XMM13_DW0_ZX, 550 BS3CG1DST_XMM14_DW0_ZX, 551 BS3CG1DST_XMM15_DW0_ZX, 534 552 /* AVX registers. */ 535 553 BS3CG1DST_YMM0, -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-StrFormatV.c
r62484 r66464 215 215 #if ARCH_BITS != 64 216 216 /* Avoid 64-bit division by formatting 64-bit numbers as hex if they're higher than _4G. */ 217 if ( pState->uBase == 10 218 && !(uValue >> 32)) /* uValue <= UINT32_MAX does not work, trouble with 64-bit compile time math! */ 219 return bs3StrFormatU32(pState, uValue); 220 pState->fFlags |= STR_F_SPECIAL; 221 pState->uBase = 16; 217 if (pState->uBase == 10) 218 { 219 if (!(uValue >> 32)) /* uValue <= UINT32_MAX does not work, trouble with 64-bit compile time math! */ 220 return bs3StrFormatU32(pState, uValue); 221 pState->fFlags |= STR_F_SPECIAL; 222 pState->uBase = 16; 223 } 222 224 #endif 223 225
Note:
See TracChangeset
for help on using the changeset viewer.