VirtualBox

Changeset 42051 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jul 9, 2012 12:42:18 PM (13 years ago)
Author:
vboxsync
Message:

MakeDebianBiosAssembly.cpp: Fixed invalid instruction handling and dropped some unnecessary yasm exceptions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS-new/MakeDebianBiosAssembly.cpp

    r41760 r42051  
    839839        && pCpuState->ModRM.Bits.Reg != 0)
    840840        fDifferent = true;
    841     /** @todo "TEST Eb,Ib" (f6 0f 08) ends up with no mnemonic as well as
    842      *        wrong length (2 instead of 3)! */
    843     else if (   pCpuState->bOpCode == 0xf6
    844              && pb[1] == 0x0f
    845              && pb[2] == 0x08
    846              && RT_C_IS_SPACE(*pszBuf) )
    847         fDifferent = true;
    848     /** @todo "INSB Yb,DX" (6c) ends up with no mnemonic here. */
    849     else if (pCpuState->bOpCode == 0x6c && RT_C_IS_SPACE(*pszBuf))
    850         fDifferent = true;
    851841    /*
    852842     * Check these out and consider adding them to DISFormatYasmIsOddEncoding.
     
    860850             && pb[2] == 0xba)
    861851        fDifferent = true; /* mov ch, 0bah  - yasm uses a short sequence: 0xb5 0xba. */
    862     /*
    863      * Switch table fun (.sym may help):
    864      */
    865 #if 0
    866     else if (   pb[0] == 0x64
    867              && pb[1] == 0x65
    868              && pb[2] == 0x05
    869              /*&& pb[3] == 0x61
    870              && pb[4] == 0x19*/)
    871         fDifferent = true; /* gs add ax, 01961h - both fs and gs prefix. Probably some switch table. */
    872     else if (   pb[0] == 0x65
    873              && pb[1] == 0x36
    874              && pb[2] == 0x65
    875              && pb[3] == 0xae)
    876         fDifferent = true; /* gs scasb - switch table or smth. */
    877     else if (   pb[0] == 0x67
    878              && pb[1] == 0xe7
    879              /*&& pb[2] == 0x67*/)
    880         fDifferent = true; /* out 067h, ax - switch table or smth. */
    881 #endif
    882852
    883853
     
    972942                                        disReadOpcodeBytes, NULL, &CpuState, &cbInstr);
    973943            if (   RT_SUCCESS(rc)
    974                 && cbInstr <= cb)
     944                && cbInstr <= cb
     945                && CpuState.pCurInstr
     946                && CpuState.pCurInstr->uOpcode != OP_INVALID)
    975947            {
    976948                char szTmp[4096];
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