VirtualBox

Changeset 53032 in vbox


Ignore:
Timestamp:
Oct 10, 2014 4:18:37 PM (10 years ago)
Author:
vboxsync
Message:

DIS: #6249: Added crc32 Gy, Ew support (with word as operand 2)

Location:
trunk/src/VBox/Disassembler
Files:
4 edited

Legend:

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

    r53007 r53032  
    20002000
    20012001    case OP_REPNE:   /* 0xF2 */
    2002         if (g_apThreeByteMapX86_F20F38[pDis->bOpCode >> 4])
     2002        if ((pDis->fPrefix & DISPREFIX_OPSIZE) && g_apThreeByteMapX86_66F20F38[pDis->bOpCode >> 4])
     2003        {
     2004        /* 0x66F2 */
     2005            pOpcode = g_apThreeByteMapX86_66F20F38[pDis->bOpCode >> 4];
     2006            pOpcode = &pOpcode[pDis->bOpCode & 0xf];
     2007
     2008            if (pOpcode->uOpcode != OP_INVALID)
     2009            {
     2010                /* Table entry is valid, so use the extension table. */
     2011
     2012                /* Cancel prefix changes. */
     2013                pDis->fPrefix &= ~DISPREFIX_REPNE;
     2014                pDis->fPrefix &= ~DISPREFIX_OPSIZE;
     2015                if (pDis->uCpuMode == DISCPUMODE_64BIT)
     2016                {
     2017                    pDis->uOpMode = (pDis->fRexPrefix & DISPREFIX_REX_FLAGS_W ? DISCPUMODE_64BIT : DISCPUMODE_32BIT);
     2018                }
     2019                else
     2020                    pDis->uOpMode  = pDis->uCpuMode;
     2021            }
     2022        }
     2023        else if (g_apThreeByteMapX86_F20F38[pDis->bOpCode >> 4])
    20032024        {
    20042025            pOpcode = g_apThreeByteMapX86_F20F38[pDis->bOpCode >> 4];
  • trunk/src/VBox/Disassembler/DisasmInternal.h

    r53007 r53032  
    110110/** Three byte opcode map with prefix 0x66 (0xF 0x3A) */
    111111extern PCDISOPCODE const g_apThreeByteMapX86_660F3A[16];
     112
     113/** Three byte opcode map with prefixes 0x66 0xF2 (0xF 0x38) */
     114extern PCDISOPCODE const g_apThreeByteMapX86_66F20F38[16];
    112115/** @} */
    113116
  • trunk/src/VBox/Disassembler/DisasmTables.cpp

    r53007 r53032  
    12971297    OP("movbe %Gy,%My",          IDX_ParseModRM,     IDX_UseModRM,   0,          OP_MOVBEGM,     OP_PARM_Gy,          OP_PARM_My,     OP_PARM_NONE,   DISOPTYPE_HARMLESS),
    12981298    OP("movbe %My,%Gy",          IDX_ParseModRM,     IDX_UseModRM,   0,          OP_MOVBEMG,     OP_PARM_My,          OP_PARM_Gy,     OP_PARM_NONE,   DISOPTYPE_HARMLESS),
    1299     INVALID_OPCODE,   
     1299    INVALID_OPCODE,
    13001300    INVALID_OPCODE,
    13011301    INVALID_OPCODE,
     
    15581558    /* f */
    15591559    &g_aThreeByteMapX86_F20F38_F[0],
     1560};
     1561
     1562/** Three byte opcode map with prefixes 0x66 0xF2 (0xF 0x38) */
     1563PCDISOPCODE const g_apThreeByteMapX86_66F20F38[16] =
     1564{
     1565    /* 0 */
     1566    NULL,
     1567    /* 1 */
     1568    NULL,
     1569    /* 2 */
     1570    NULL,
     1571    /* 3 */
     1572    NULL,
     1573    /* 4 */
     1574    NULL,
     1575    /* 5 */
     1576    NULL,
     1577    /* 6 */
     1578    NULL,
     1579    /* 7 */
     1580    NULL,
     1581    /* 8 */
     1582    NULL,
     1583    /* 9 */
     1584    NULL,
     1585    /* a */
     1586    NULL,
     1587    /* b */
     1588    NULL,
     1589    /* c */
     1590    NULL,
     1591    /* d */
     1592    NULL,
     1593    /* e */
     1594    NULL,
     1595    /* f */
     1596    &g_aThreeByteMapX86_66F20F38_F[0],
    15601597};
    15611598
  • trunk/src/VBox/Disassembler/testcase/tstDisasm-1A.asm

    r53007 r53032  
    170170
    171171        crc32       eax, bl
    172         ;crc32       eax, bx
     172        crc32       eax, bx
    173173        crc32       eax, ebx
    174174        crc32       eax, byte [edi]
    175         ;crc32       eax, word [edi]
     175        crc32       eax, word [edi]
    176176        crc32       eax, dword [edi]
    177177
     
    282282
    283283        crc32       eax, bl
    284         ;crc32       eax, bx
     284        crc32       eax, bx
    285285        crc32       eax, ebx
    286286        crc32       eax, byte [edi]
    287         ;crc32       eax, word [edi]
     287        crc32       eax, word [edi]
    288288        crc32       eax, dword [edi]
    289289
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