Changeset 47287 in vbox for trunk/src/VBox
- Timestamp:
- Jul 20, 2013 8:06:43 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/testcase/Instructions/InstructionTestGen.py
r47286 r47287 488 488 self.fnCalcResult = fnCalcResult; 489 489 self.acbOpVars = [ 1, 2, 4, 8 ] if not acbOpVars else list(acbOpVars); 490 self.fTestRegForm = True; 491 self.fTestMemForm = True; 490 492 491 493 ## @name Test Instruction Writers … … 494 496 def writeInstrGregGreg(self, cbEffOp, iOp1, iOp2, oGen): 495 497 """ Writes the instruction with two general registers as operands. """ 496 fRexByteRegs = oGen.oTarget.is64Bit();497 498 oGen.write(' %s %s, %s\n' 498 499 % ( self.sInstr, oGen.gregNameBytes(iOp1, cbEffOp), oGen.gregNameBytes(iOp2, cbEffOp),)); … … 586 587 ## @name Memory setups 587 588 ## @{ 589 588 590 def generateMemSetupReadByLabel(self, oGen, cbEffOp, uInput): 589 591 """ Sets up memory for a memory read. """ … … 794 796 795 797 # Register tests 796 if True:798 if self.fTestRegForm: 797 799 for cbEffOp in self.acbOpVars: 798 800 if cbEffOp > cbMaxOp: … … 825 827 826 828 # Memory test. 827 if True:829 if self.fTestMemForm: 828 830 for cAddrBits in oGen.oTarget.getAddrModes(): 829 831 for cbEffOp in self.acbOpVars: … … 853 855 # SIB - currently only short list of inputs or things may get seriously out of hand. 854 856 self.generateStdTestGregMemSib(oGen, cAddrBits, cbEffOp, cbMaxOp, oGen.iModReg, auShortInputs); 855 #break;856 #break;857 858 859 857 return True; 860 858 861 859 def generateTest(self, oGen, sTestFnName): 862 860 oGen.write('VBINSTST_BEGINPROC %s\n' % (sTestFnName,)); 863 #oGen.write(' int3\n');864 861 865 862 self.generateStandardTests(oGen); 866 863 867 #oGen.write(' int3\n');868 864 oGen.write(' ret\n'); 869 865 oGen.write('VBINSTST_ENDPROC %s\n' % (sTestFnName,)); … … 898 894 def __init__(self): 899 895 InstrTest_MemOrGreg_2_Greg.__init__(self, 'movsxd Gv,Ev', self.calc_movsxd, acbOpVars = [ 8, 4, 2, ]); 896 self.fTestMemForm = False; # drop this... 900 897 901 898 def writeInstrGregGreg(self, cbEffOp, iOp1, iOp2, oGen): 899 """ Writes the instruction with two general registers as operands. """ 902 900 if cbEffOp == 8: 903 oGen.write(' %s %s, %s\n' % (self.sInstr, g_asGRegs64[iOp1], g_asGRegs32[iOp2])); 904 elif cbEffOp == 4 or cbEffOp == 2: 905 abInstr = []; 906 if cbEffOp != oGen.oTarget.getDefOpBytes(): 907 abInstr.append(X86_OP_PRF_SIZE_OP); 908 abInstr += calcRexPrefixForTwoModRmRegs(iOp1, iOp2); 909 abInstr.append(0x63); 910 abInstr += calcModRmForTwoRegs(iOp1, iOp2); 911 oGen.writeInstrBytes(abInstr); 901 oGen.write(' movsxd %s, %s\n' 902 % ( oGen.gregNameBytes(iOp1, cbEffOp), oGen.gregNameBytes(iOp2, cbEffOp / 2),)); 912 903 else: 913 assert False;914 assert False;904 oGen.write(' oddmovsxd %s, %s\n' 905 % ( oGen.gregNameBytes(iOp1, cbEffOp), oGen.gregNameBytes(iOp2, cbEffOp),)); 915 906 return True; 916 907 … … 1317 1308 g_aoInstructionTests = [ 1318 1309 InstrTest_Mov_Gv_Ev(), 1319 ##InstrTest_MovSxD_Gv_Ev(),1310 InstrTest_MovSxD_Gv_Ev(), 1320 1311 InstrTest_DivIDiv(fIsIDiv = False), 1321 1312 InstrTest_DivIDiv(fIsIDiv = True),
Note:
See TracChangeset
for help on using the changeset viewer.