VirtualBox

Changeset 67005 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 22, 2017 10:59:07 AM (8 years ago)
Author:
vboxsync
Message:

IEM: More tests for movd & movq.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h

    r67004 r67005  
    34643464         * @optest      64-bit / op1=1 op2=2   -> op1=2   ftw=0xff
    34653465         * @optest      64-bit / op1=0 op2=-42 -> op1=-42 ftw=0xff
     3466        * @oponly
    34663467         */
    34673468        IEMOP_MNEMONIC2(RM, MOVQ, movq, Pq_WO, Eq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OZ_PFX);
     
    35163517         * @optest      op1=1 op2=2   -> op1=2   ftw=0xff
    35173518         * @optest      op1=0 op2=-42 -> op1=-42 ftw=0xff
     3519         * @oponly
    35183520         */
    35193521        IEMOP_MNEMONIC2(RM, MOVD, movd, PdZx_WO, Ed, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OZ_PFX);
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c

    r67004 r67005  
    17181718            pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2;
    17191719            pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6;
    1720             break;
     1720            iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0;
     1721            break;
     1722#if ARCH_BITS == 64
    17211723        case 2:
     1724            off = Bs3Cg1InsertReqPrefix(pThis, 0);
     1725            pThis->abCurInstr[off++] = REX__RBX;
     1726            off = Bs3Cg1InsertOpcodes(pThis, off);
     1727            pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2);
     1728            pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2 + 8;
     1729            pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6; /* no +8*/
     1730            break;
     1731#endif
     1732        case 3:
    17221733            pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationMem;
    17231734            off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    17241735            off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);
    17251736            break;
    1726         case 3:
     1737        case 4:
    17271738            off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    17281739            off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 /*iReg*/, 1 /*cbMisalign*/);
    1729             break;
     1740            iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0;
     1741            break;
     1742#if ARCH_BITS == 64
     1743        case 5:
     1744            off = Bs3Cg1InsertReqPrefix(pThis, 0);
     1745            pThis->abCurInstr[off++] = REX__RBX;
     1746            off = Bs3Cg1InsertOpcodes(pThis, off);
     1747            off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 /*iReg*/, 0 /*cbMisalign*/);
     1748            break;
     1749#endif
    17301750
    17311751        default:
     
    17631783                break;
    17641784            case 2:
     1785                off = Bs3Cg1InsertReqPrefix(pThis, 0);
     1786                pThis->abCurInstr[off++] = REX_WRBX;
     1787                off = Bs3Cg1InsertOpcodes(pThis, off);
     1788                pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2);
     1789                pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2 + 8;
     1790                pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6; /* no +8*/
     1791                break;
     1792            case 3:
    17651793                pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationMem;
    17661794                off = Bs3Cg1InsertReqPrefix(pThis, 0);
     
    17691797                off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);
    17701798                break;
    1771             case 3:
     1799            case 4:
    17721800                off = Bs3Cg1InsertReqPrefix(pThis, 0);
    17731801                pThis->abCurInstr[off++] = REX_W___;
    17741802                off = Bs3Cg1InsertOpcodes(pThis, off);
    17751803                off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 /*iReg*/, 1 /*cbMisalign*/);
     1804                break;
     1805            case 5:
     1806                off = Bs3Cg1InsertReqPrefix(pThis, 0);
     1807                pThis->abCurInstr[off++] = REX_WRBX;
     1808                off = Bs3Cg1InsertOpcodes(pThis, off);
     1809                off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 /*iReg*/, 0 /*cbMisalign*/);
    17761810                break;
    17771811
     
    18051839            pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2;
    18061840            pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6;
    1807             break;
     1841            iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0;
     1842            break;
     1843#if ARCH_BITS == 64
    18081844        case 2:
     1845            off = Bs3Cg1InsertReqPrefix(pThis, 0);
     1846            pThis->abCurInstr[off++] = REX__RBX;
     1847            off = Bs3Cg1InsertOpcodes(pThis, off);
     1848            pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2);
     1849            pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2 + 8;
     1850            pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6 + 8;
     1851            break;
     1852#endif
     1853        case 3:
    18091854            pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationMem;
    18101855            off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    18111856            off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);
    18121857            break;
    1813         case 3:
     1858        case 4:
    18141859            off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0));
    18151860            off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 /*iReg*/, 1 /*cbMisalign*/);
    1816             break;
     1861            iEncoding += !BS3CG1_IS_64BIT_TARGET(pThis) ? 1 : 0;
     1862            break;
     1863#if ARCH_BITS == 64
     1864        case 5:
     1865            off = Bs3Cg1InsertReqPrefix(pThis, 0);
     1866            pThis->abCurInstr[off++] = REX__RBX;
     1867            off = Bs3Cg1InsertOpcodes(pThis, off);
     1868            off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7+8 /*iReg*/, 0 /*cbMisalign*/);
     1869            break;
     1870#endif
    18171871
    18181872        default:
     
    18511905                break;
    18521906            case 2:
     1907                off = Bs3Cg1InsertReqPrefix(pThis, 0);
     1908                pThis->abCurInstr[off++] = REX_WRBX;
     1909                off = Bs3Cg1InsertOpcodes(pThis, off);
     1910                pThis->abCurInstr[off++] = X86_MODRM_MAKE(3, 6, 2);
     1911                pThis->aOperands[pThis->iRmOp ].idxField = pThis->aOperands[pThis->iRmOp ].idxFieldBase + 2 + 8;
     1912                pThis->aOperands[pThis->iRegOp].idxField = pThis->aOperands[pThis->iRegOp].idxFieldBase + 6 + 8;
     1913                break;
     1914            case 4:
    18531915                pThis->aOperands[pThis->iRmOp ].enmLocation = pThis->aOperands[pThis->iRmOp].enmLocationMem;
    18541916                off = Bs3Cg1InsertReqPrefix(pThis, 0);
     
    18571919                off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 4 /*iReg*/, 0 /*cbMisalign*/);
    18581920                break;
    1859             case 3:
     1921            case 5:
    18601922                off = Bs3Cg1InsertReqPrefix(pThis, 0);
    18611923                pThis->abCurInstr[off++] = REX_W___;
    18621924                off = Bs3Cg1InsertOpcodes(pThis, off);
    18631925                off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7 /*iReg*/, 1 /*cbMisalign*/);
     1926                break;
     1927            case 6:
     1928                off = Bs3Cg1InsertReqPrefix(pThis, 0);
     1929                pThis->abCurInstr[off++] = REX_WRBX;
     1930                off = Bs3Cg1InsertOpcodes(pThis, off);
     1931                off = Bs3Cfg1EncodeMemMod0DispWithRegFieldAndDefaults(pThis, false, off, 7+8 /*iReg*/, 0 /*cbMisalign*/);
    18641932                break;
    18651933
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