VirtualBox

Changeset 41743 in vbox


Ignore:
Timestamp:
Jun 15, 2012 2:00:58 AM (13 years ago)
Author:
vboxsync
Message:

DISOPPARAM: s/index.reg_gen/Index.idxGenReg/ + doc

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/dis.h

    r41742 r41743  
    194194/** @name 64-bit general register indexes.
    195195 * This matches the AMD64 register encoding.  It is found used in
    196  * DISOPPARAM::base.reg_gen and DISOPPARAM::index.reg_gen.
     196 * DISOPPARAM::base.reg_gen and DISOPPARAM::Index.idxGenReg.
    197197 * @note  Safe to assume same values as the 16-bit and 32-bit general registers.
    198198 * @{
     
    218218/** @name 32-bit general register indexes.
    219219 * This matches the AMD64 register encoding.  It is found used in
    220  * DISOPPARAM::base.reg_gen and DISOPPARAM::index.reg_gen.
     220 * DISOPPARAM::base.reg_gen and DISOPPARAM::Index.idxGenReg.
    221221 * @note  Safe to assume same values as the 16-bit and 64-bit general registers.
    222222 * @{
     
    242242/** @name 16-bit general register indexes.
    243243 * This matches the AMD64 register encoding.  It is found used in
    244  * DISOPPARAM::base.reg_gen and DISOPPARAM::index.reg_gen.
     244 * DISOPPARAM::base.reg_gen and DISOPPARAM::Index.idxGenReg.
    245245 * @note  Safe to assume same values as the 32-bit and 64-bit general registers.
    246246 * @{
     
    266266/** @name 8-bit general register indexes.
    267267 * This mostly (?) matches the AMD64 register encoding.  It is found used in
    268  * DISOPPARAM::base.reg_gen and DISOPPARAM::index.reg_gen.
     268 * DISOPPARAM::base.reg_gen and DISOPPARAM::Index.idxGenReg.
    269269 * @{
    270270 */
     
    426426        uint8_t     reg_dbg;
    427427    } base;
     428    /** The SIB index register meaning, applicable if DISUSE_INDEX is
     429     * set in fUse. */
    428430    union
    429431    {
    430         /** DISGREG_XXX. */
    431         uint8_t     reg_gen;
    432     } index;
    433 
     432        /** General register index (DISGREG_XXX), applicable if DISUSE_REG_GEN8,
     433         * DISUSE_REG_GEN16, DISUSE_REG_GEN32 or DISUSE_REG_GEN64 is set in fUse. */
     434        uint8_t     idxGenReg;
     435    } Index;
    434436    /** 2, 4 or 8, if DISUSE_SCALE is set in fUse. */
    435437    uint8_t         uScale;
  • trunk/src/VBox/Disassembler/DisasmCore.cpp

    r41742 r41743  
    617617    {
    618618         pParam->fUse |= DISUSE_INDEX | regtype;
    619          pParam->index.reg_gen = index;
     619         pParam->Index.idxGenReg = index;
    620620
    621621         if (scale != 0)
     
    23792379    {
    23802380        pParam->fUse |= DISUSE_INDEX;
    2381         pParam->index.reg_gen = IndexModRMReg16[idx];
     2381        pParam->Index.idxGenReg = IndexModRMReg16[idx];
    23822382    }
    23832383}
  • trunk/src/VBox/Disassembler/DisasmFormatYasm.cpp

    r41742 r41743  
    208208        case DISCPUMODE_16BIT:
    209209        {
    210             Assert(pParam->index.reg_gen < RT_ELEMENTS(g_aszYasmRegGen16));
    211             const char *psz = g_aszYasmRegGen16[pParam->index.reg_gen];
     210            Assert(pParam->Index.idxGenReg < RT_ELEMENTS(g_aszYasmRegGen16));
     211            const char *psz = g_aszYasmRegGen16[pParam->Index.idxGenReg];
    212212            *pcchReg = 2 + !!psz[2] + !!psz[3];
    213213            return psz;
     
    216216        case DISCPUMODE_32BIT:
    217217        {
    218             Assert(pParam->index.reg_gen < RT_ELEMENTS(g_aszYasmRegGen32));
    219             const char *psz = g_aszYasmRegGen32[pParam->index.reg_gen];
     218            Assert(pParam->Index.idxGenReg < RT_ELEMENTS(g_aszYasmRegGen32));
     219            const char *psz = g_aszYasmRegGen32[pParam->Index.idxGenReg];
    220220            *pcchReg = 2 + !!psz[2] + !!psz[3];
    221221            return psz;
     
    224224        case DISCPUMODE_64BIT:
    225225        {
    226             Assert(pParam->index.reg_gen < RT_ELEMENTS(g_aszYasmRegGen64));
    227             const char *psz = g_aszYasmRegGen64[pParam->index.reg_gen];
     226            Assert(pParam->Index.idxGenReg < RT_ELEMENTS(g_aszYasmRegGen64));
     227            const char *psz = g_aszYasmRegGen64[pParam->Index.idxGenReg];
    228228            *pcchReg = 2 + !!psz[2] + !!psz[3];
    229229            return psz;
  • trunk/src/VBox/Disassembler/DisasmReg.cpp

    r41742 r41743  
    549549
    550550                pParamVal->flags |= DISQPV_FLAG_16;
    551                 if (RT_FAILURE(DISFetchReg16(pCtx, pParam->index.reg_gen, &val16))) return VERR_INVALID_PARAMETER;
     551                if (RT_FAILURE(DISFetchReg16(pCtx, pParam->Index.idxGenReg, &val16))) return VERR_INVALID_PARAMETER;
    552552
    553553                Assert(!(pParam->fUse & DISUSE_SCALE));   /* shouldn't be possible in 16 bits mode */
     
    561561
    562562                pParamVal->flags |= DISQPV_FLAG_32;
    563                 if (RT_FAILURE(DISFetchReg32(pCtx, pParam->index.reg_gen, &val32))) return VERR_INVALID_PARAMETER;
     563                if (RT_FAILURE(DISFetchReg32(pCtx, pParam->Index.idxGenReg, &val32))) return VERR_INVALID_PARAMETER;
    564564
    565565                if (pParam->fUse & DISUSE_SCALE)
     
    574574
    575575                pParamVal->flags |= DISQPV_FLAG_64;
    576                 if (RT_FAILURE(DISFetchReg64(pCtx, pParam->index.reg_gen, &val64))) return VERR_INVALID_PARAMETER;
     576                if (RT_FAILURE(DISFetchReg64(pCtx, pParam->Index.idxGenReg, &val64))) return VERR_INVALID_PARAMETER;
    577577
    578578                if (pParam->fUse & DISUSE_SCALE)
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