VirtualBox

Changeset 66334 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Mar 29, 2017 2:26:23 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
114268
Message:

IEM: Fixed UD1 / grp 10 decoding (intel eats modr/m after it).

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsPython.py

    r66331 r66334  
    448448        'byte':     [ 256, ], ##< next opcode byte selects the instruction (default).
    449449        '/r':       [   8, ], ##< modrm.reg selects the instruction.
     450        'memreg /r':[  16, ], ##< modrm.reg and (modrm.mod == 3) selects the instruction.
    450451        'mod /r':   [  32, ], ##< modrm.reg and modrm.mod selects the instruction.
    451452        '!11 /r':   [   8, ], ##< modrm.reg selects the instruction with modrm.mod != 0y11.
     
    494495        if self.sSelector == 'mod /r':
    495496            return (bOpcode >> 3) & 0x1f;
     497
     498        if self.sSelector == 'memreg /r':
     499            return ((bOpcode >> 3) & 0x7) | (int((bOpcode >> 6) == 3) << 3);
    496500
    497501        if self.sSelector == '!11 /r':
     
    12071211    'grp13':        InstructionMap('grp13',     asLeadOpcodes = ['0x0f', '0x72',], sSelector = 'mod /r'),
    12081212    'grp14':        InstructionMap('grp14',     asLeadOpcodes = ['0x0f', '0x73',], sSelector = 'mod /r'),
    1209     'grp15':        InstructionMap('grp15',     asLeadOpcodes = ['0x0f', '0xae',], sSelector = 'mod /r'),
     1213    'grp15':        InstructionMap('grp15',     asLeadOpcodes = ['0x0f', '0xae',], sSelector = 'memreg /r'),
    12101214    'grp16':        InstructionMap('grp16',     asLeadOpcodes = ['0x0f', '0x18',], sSelector = 'mod /r'),
    12111215    'grpA17':       InstructionMap('grpA17',    asLeadOpcodes = ['0x0f', '0x78',], sSelector = '/r'), # AMD: EXTRQ weirdness
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h

    r66332 r66334  
    65556555
    65566556
    6557 /** Opcode 0x0f 0xb9. */
     6557/**
     6558 * @opcode      0xb9
     6559 * @opinvalid   intel-modrm
     6560 * @optest      op1=1 op2=2 ->
     6561 * @oponlytest
     6562 */
    65586563FNIEMOP_DEF(iemOp_Grp10)
    65596564{
    6560     Log(("iemOp_Grp10 -> #UD\n"));
    6561     return IEMOP_RAISE_INVALID_OPCODE();
     6565    /*
     6566     * AMD does not decode beyond the 0xb9 whereas intel does the modr/m bit
     6567     * too. See bs3-cpu-decoder-1.c32.  So, we can forward to iemOp_InvalidNeedRM.
     6568     */
     6569    /** @todo fix bs3-cpu-generated-1 to deal with this on AMD! */
     6570    Log(("iemOp_Grp10 aka UD1 -> #UD\n"));
     6571    IEMOP_MNEMONIC2EX(ud1, "ud1", RM, UD1, ud1, Gb, Eb, DISOPTYPE_INVALID, IEMOPHINT_IGNORES_OP_SIZE); /* just picked Gb,Eb here. */
     6572    return FNIEMOP_CALL(iemOp_InvalidNeedRM);
    65626573}
    65636574
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