VirtualBox

Changeset 60418 in vbox


Ignore:
Timestamp:
Apr 11, 2016 10:40:01 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106504
Message:

DISFormatYasmEx: Add operand size prefix (ignored) to outsb, movsb, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Disassembler/DisasmFormatYasm.cpp

    r57358 r60418  
    466466        if (pDis->fPrefix & DISPREFIX_LOCK)
    467467            PUT_SZ("lock ");
    468         if(pDis->fPrefix & DISPREFIX_REP)
     468        if (pDis->fPrefix & DISPREFIX_REP)
    469469            PUT_SZ("rep ");
    470470        else if(pDis->fPrefix & DISPREFIX_REPNE)
     
    477477        char szTmpFmt[48];
    478478        const char *pszFmt = pOp->pszOpcode;
     479        bool fIgnoresOpSize = false;
    479480        switch (pOp->uOpcode)
    480481        {
     
    496497            case OP_INSB:
    497498                pszFmt = "insb";
     499                fIgnoresOpSize = true;
    498500                break;
    499501            case OP_INSWD:
     
    502504            case OP_OUTSB:
    503505                pszFmt = "outsb";
     506                fIgnoresOpSize = true;
    504507                break;
    505508            case OP_OUTSWD:
     
    508511            case OP_MOVSB:
    509512                pszFmt = "movsb";
     513                fIgnoresOpSize = true;
    510514                break;
    511515            case OP_MOVSWD:
     
    514518            case OP_CMPSB:
    515519                pszFmt = "cmpsb";
     520                fIgnoresOpSize = true;
    516521                break;
    517522            case OP_CMPWD:
     
    520525            case OP_SCASB:
    521526                pszFmt = "scasb";
     527                fIgnoresOpSize = true;
    522528                break;
    523529            case OP_SCASWD:
     
    526532            case OP_LODSB:
    527533                pszFmt = "lodsb";
     534                fIgnoresOpSize = true;
    528535                break;
    529536            case OP_LODSWD:
     
    532539            case OP_STOSB:
    533540                pszFmt = "stosb";
     541                fIgnoresOpSize = true;
    534542                break;
    535543            case OP_STOSWD:
     
    639647                *(int *)&pDis->Param2.fParam |= OP_PARM_v;
    640648                break;
     649        }
     650
     651        /*
     652         * Add operand size prefix for outsb, movsb, etc.
     653         */
     654        if (fIgnoresOpSize && (pDis->fPrefix & DISPREFIX_OPSIZE) )
     655        {
     656            if (pDis->uCpuMode == DISCPUMODE_16BIT)
     657                PUT_SZ("o32 ");
     658            else
     659                PUT_SZ("o16 ");
    641660        }
    642661
Note: See TracChangeset for help on using the changeset viewer.

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