Changeset 66327 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Mar 29, 2017 10:12:02 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 114260
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r66326 r66327 6775 6775 6776 6776 /** 6777 * Implements 'CLFLUSH' and 'CLFLUSHOPT'. 6778 * 6779 * This is implemented in C because it triggers a load like behviour without 6780 * actually reading anything. Since that's not so common, it's implemented 6781 * here. 6782 * 6783 * @param iEffSeg The effective segment. 6784 * @param GCPtrEff The address of the image. 6785 */ 6786 IEM_CIMPL_DEF_2(iemCImpl_clflush_clflushopt, uint8_t, iEffSeg, RTGCPTR, GCPtrEff) 6787 { 6788 /* 6789 * Pretend to do a load w/o reading (see also iemCImpl_monitor and iemMemMap). 6790 */ 6791 VBOXSTRICTRC rcStrict = iemMemApplySegment(pVCpu, IEM_ACCESS_TYPE_READ | IEM_ACCESS_WHAT_DATA, iEffSeg, 1, &GCPtrEff); 6792 if (rcStrict == VINF_SUCCESS) 6793 { 6794 RTGCPHYS GCPhysMem; 6795 rcStrict = iemMemPageTranslateAndCheckAccess(pVCpu, GCPtrEff, IEM_ACCESS_TYPE_READ | IEM_ACCESS_WHAT_DATA, &GCPhysMem); 6796 if (rcStrict == VINF_SUCCESS) 6797 { 6798 iemRegAddToRipAndClearRF(pVCpu, cbInstr); 6799 return VINF_SUCCESS; 6800 } 6801 } 6802 6803 return rcStrict; 6804 } 6805 6806 6807 /** 6777 6808 * Implements 'FINIT' and 'FNINIT'. 6778 6809 * -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsPython.py
r66323 r66327 174 174 # ModR/M.rm - memory only. 175 175 'Ma': ( 'IDX_UseModRM', 'rm', '%Ma', 'Ma', ), ##< Only used by BOUND. 176 'MbRO': ( 'IDX_UseModRM', 'rm', '%Mb', 'Mb', ), 176 177 'Mq': ( 'IDX_UseModRM', 'rm', '%Mq', 'Mq', ), 177 178 … … 1781 1782 """ 1782 1783 Tag: \@opcode 1783 Value: 0x?? | /reg | mr/reg | 11 /reg | !11 /reg | 11 mr/reg | !11 mr/reg1784 Value: 0x?? | /reg (TODO: | mr/reg | 11 /reg | !11 /reg | 11 mr/reg | !11 mr/reg) 1784 1785 1785 1786 The opcode byte or sub-byte for the instruction in the context of a map. … … 1789 1790 # Flatten and validate the value. 1790 1791 sOpcode = self.flattenAllSections(aasSections); 1791 if sOpcode in g_kdSpecialOpcodes:1792 if _isValidOpcodeByte(sOpcode): 1792 1793 pass; 1793 elif not _isValidOpcodeByte(sOpcode): 1794 elif len(sOpcode) == 2 and sOpcode[0] == '/' and sOpcode[1] in '012345678': 1795 pass; 1796 else: 1794 1797 return self.errorComment(iTagLine, '%s: invalid opcode: %s' % (sTag, sOpcode,)); 1795 1798 … … 2637 2640 # Check the parameter locations for the encoding. 2638 2641 if g_kdIemForms[sForm][1] is not None: 2639 for iOperand, sWhere in enumerate(g_kdIemForms[sForm][1]): 2640 if oInstr.aoOperands[iOperand].sWhere != sWhere: 2641 self.error('%s: current instruction @op%u and a_Form location does not match: %s vs %s (%s)' 2642 % (sMacro, iOperand + 1, oInstr.aoOperands[iOperand].sWhere, sWhere, sForm,)); 2642 if len(g_kdIemForms[sForm][1]) != len(oInstr.aoOperands): 2643 self.error('%s: The a_Form=%s has a different operand count: %s (form) vs %s' 2644 % (sMacro, sForm, len(g_kdIemForms[sForm][1]), len(oInstr.aoOperands) )); 2645 else: 2646 for iOperand, sWhere in enumerate(g_kdIemForms[sForm][1]): 2647 if oInstr.aoOperands[iOperand].sWhere != sWhere: 2648 self.error('%s: current instruction @op%u and a_Form location does not match: %s vs %s (%s)' 2649 % (sMacro, iOperand + 1, oInstr.aoOperands[iOperand].sWhere, sWhere, sForm,)); 2643 2650 2644 2651 # Stats. -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r66324 r66327 5839 5839 FNIEMOP_UD_STUB_1(iemOp_Grp15_xsaveopt, uint8_t, bRm); 5840 5840 5841 /** Opcode 0x0f 0xae mem/7. */ 5842 FNIEMOP_STUB_1(iemOp_Grp15_clflush, uint8_t, bRm); 5841 /** 5842 * @opmaps grp15 5843 * @opcode /7 5844 * @oppfx none 5845 * @opcpuid clfsh 5846 * @opgroup og_sse2_cachectl 5847 * @optest op1=1 -> 5848 * @oponlytest 5849 */ 5850 FNIEMOP_DEF_1(iemOp_Grp15_clflush, uint8_t, bRm) 5851 { 5852 /** @todo clflushopt is same with 66h prefix. */ 5853 IEMOP_MNEMONIC1(M_MEM, CLFLUSH, clflush, MbRO, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE); 5854 if (!IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fClFlush) 5855 return IEMOP_RAISE_INVALID_OPCODE(); 5856 5857 IEM_MC_BEGIN(2, 0); 5858 IEM_MC_ARG(uint8_t, iEffSeg, 0); 5859 IEM_MC_ARG(RTGCPTR, GCPtrEff, 1); 5860 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEff, bRm, 0); 5861 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 5862 IEM_MC_ASSIGN(iEffSeg, pVCpu->iem.s.iEffSeg); 5863 IEM_MC_CALL_CIMPL_2(iemCImpl_clflush_clflushopt, iEffSeg, GCPtrEff); 5864 IEM_MC_END(); 5865 return VINF_SUCCESS; 5866 } 5843 5867 5844 5868
Note:
See TracChangeset
for help on using the changeset viewer.