VirtualBox

Changeset 47287 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 20, 2013 8:06:43 PM (11 years ago)
Author:
vboxsync
Message:

Back to the MOVXSD instruction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/Instructions/InstructionTestGen.py

    r47286 r47287  
    488488        self.fnCalcResult = fnCalcResult;
    489489        self.acbOpVars    = [ 1, 2, 4, 8 ] if not acbOpVars else list(acbOpVars);
     490        self.fTestRegForm = True;
     491        self.fTestMemForm = True;
    490492
    491493    ## @name Test Instruction Writers
     
    494496    def writeInstrGregGreg(self, cbEffOp, iOp1, iOp2, oGen):
    495497        """ Writes the instruction with two general registers as operands. """
    496         fRexByteRegs = oGen.oTarget.is64Bit();
    497498        oGen.write('        %s %s, %s\n'
    498499                   % ( self.sInstr, oGen.gregNameBytes(iOp1, cbEffOp), oGen.gregNameBytes(iOp2, cbEffOp),));
     
    586587    ## @name Memory setups
    587588    ## @{
     589
    588590    def generateMemSetupReadByLabel(self, oGen, cbEffOp, uInput):
    589591        """ Sets up memory for a memory read. """
     
    794796
    795797        # Register tests
    796         if True:
     798        if self.fTestRegForm:
    797799            for cbEffOp in self.acbOpVars:
    798800                if cbEffOp > cbMaxOp:
     
    825827
    826828        # Memory test.
    827         if True:
     829        if self.fTestMemForm:
    828830            for cAddrBits in oGen.oTarget.getAddrModes():
    829831                for cbEffOp in self.acbOpVars:
     
    853855                                # SIB - currently only short list of inputs or things may get seriously out of hand.
    854856                                self.generateStdTestGregMemSib(oGen, cAddrBits, cbEffOp, cbMaxOp, oGen.iModReg, auShortInputs);
    855                     #break;
    856                 #break;
    857 
    858 
    859857        return True;
    860858
    861859    def generateTest(self, oGen, sTestFnName):
    862860        oGen.write('VBINSTST_BEGINPROC %s\n' % (sTestFnName,));
    863         #oGen.write('        int3\n');
    864861
    865862        self.generateStandardTests(oGen);
    866863
    867         #oGen.write('        int3\n');
    868864        oGen.write('        ret\n');
    869865        oGen.write('VBINSTST_ENDPROC   %s\n' % (sTestFnName,));
     
    898894    def __init__(self):
    899895        InstrTest_MemOrGreg_2_Greg.__init__(self, 'movsxd Gv,Ev', self.calc_movsxd, acbOpVars = [ 8, 4, 2, ]);
     896        self.fTestMemForm = False; # drop this...
    900897
    901898    def writeInstrGregGreg(self, cbEffOp, iOp1, iOp2, oGen):
     899        """ Writes the instruction with two general registers as operands. """
    902900        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),));
    912903        else:
    913             assert False;
    914             assert False;
     904            oGen.write('        oddmovsxd %s, %s\n'
     905                       % ( oGen.gregNameBytes(iOp1, cbEffOp), oGen.gregNameBytes(iOp2, cbEffOp),));
    915906        return True;
    916907
     
    13171308g_aoInstructionTests = [
    13181309    InstrTest_Mov_Gv_Ev(),
    1319     ##InstrTest_MovSxD_Gv_Ev(),
     1310    InstrTest_MovSxD_Gv_Ev(),
    13201311    InstrTest_DivIDiv(fIsIDiv = False),
    13211312    InstrTest_DivIDiv(fIsIDiv = True),
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette