VirtualBox

Changeset 41744 in vbox for trunk/include/VBox/dis.h


Ignore:
Timestamp:
Jun 15, 2012 2:29:09 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
78552
Message:

DISOPPARAM: s/base.reg_*/Base.idx*Reg/ + docs

File:
1 edited

Legend:

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

    r41743 r41744  
    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.idxGenReg.
     196 * DISOPPARAM::Base.idxGenReg 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.idxGenReg.
     220 * DISOPPARAM::Base.idxGenReg 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.idxGenReg.
     244 * DISOPPARAM::Base.idxGenReg 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.idxGenReg.
     268 * DISOPPARAM::Base.idxGenReg and DISOPPARAM::Index.idxGenReg.
    269269 * @{
    270270 */
     
    293293/** @name Segment registerindexes.
    294294 * This matches the AMD64 register encoding.  It is found used in
    295  * DISOPPARAM::base.reg_seg.
     295 * DISOPPARAM::Base.idxSegReg.
    296296 * @{
    297297 */
     
    311311/** @name FPU register indexes.
    312312 * This matches the AMD64 register encoding.  It is found used in
    313  * DISOPPARAM::base.reg_fp.
     313 * DISOPPARAM::Base.idxFpuReg.
    314314 * @{
    315315 */
     
    326326/** @name Control register indexes.
    327327 * This matches the AMD64 register encoding.  It is found used in
    328  * DISOPPARAM::base.reg_ctrl.
     328 * DISOPPARAM::Base.idxCtrlReg.
    329329 * @{
    330330 */
     
    339339/** @name Debug register indexes.
    340340 * This matches the AMD64 register encoding.  It is found used in
    341  * DISOPPARAM::base.reg_dbg.
     341 * DISOPPARAM::Base.idxDbgReg.
    342342 * @{
    343343 */
     
    354354/** @name MMX register indexes.
    355355 * This matches the AMD64 register encoding.  It is found used in
    356  * DISOPPARAM::base.reg_mmx.
     356 * DISOPPARAM::Base.idxMmxReg.
    357357 * @{
    358358 */
     
    369369/** @name SSE register indexes.
    370370 * This matches the AMD64 register encoding.  It is found used in
    371  * DISOPPARAM::base.reg_xmm.
     371 * DISOPPARAM::Base.idxXmmReg.
    372372 * @{
    373373 */
     
    380380#define DISXREG_XMM6                    UINT8_C(6)
    381381#define DISXREG_XMM7                    UINT8_C(7)
    382 /** @}  */
     382/** @} */
    383383
    384384
     
    388388typedef struct DISOPPARAM
    389389{
    390     /** Immediate value or address, if used. */
    391     uint64_t        uValue;
    392390    /** A combination of DISUSE_XXX. */
    393391    uint64_t        fUse;
     392    /** Immediate value or address, applicable if any of the flags included in
     393     * DISUSE_IMMEDIATE are set in fUse. */
     394    uint64_t        uValue;
     395    /** Disposition.  */
    394396    union
    395397    {
     398        /** 64-bit displacement, applicable if DISUSE_DISPLACEMENT64 is set in fUse.  */
    396399        int64_t     i64;
     400        uint64_t    u64;
     401        /** 32-bit displacement, applicable if DISUSE_DISPLACEMENT32 or
     402         * DISUSE_RIPDISPLACEMENT32  is set in fUse. */
    397403        int32_t     i32;
     404        uint32_t    u32;
     405        /** 16-bit displacement, applicable if DISUSE_DISPLACEMENT16 is set in fUse.  */
    398406        int32_t     i16;
     407        uint32_t    u16;
     408        /** 8-bit displacement, applicable if DISUSE_DISPLACEMENT8 is set in fUse.  */
    399409        int32_t     i8;
    400         uint64_t    u64;
    401         uint32_t    u32;
    402         uint32_t    u16;
    403410        uint32_t    u8;
    404411    } uDisp;
    405     /** Copy of the corresponding DISOPCODE::fParam1 / DISOPCODE::fParam2 /
    406      *  DISOPCODE::fParam3. */
    407     uint32_t        fParam;
    408 
     412    /** The base register from ModR/M or SIB, applicable if DISUSE_BASE is
     413     * set in fUse. */
    409414    union
    410415    {
    411         /** DISGREG_XXX. */
    412         uint8_t     reg_gen;
    413         /** DISFPREG_XXX */
    414         uint8_t     reg_fp;
    415         /** DISMREG_XXX. */
    416         uint8_t     reg_mmx;
    417         /** DISXREG_XXX. */
    418         uint8_t     reg_xmm;
    419         /** DISSELREG_XXX. */
    420         uint8_t     reg_seg;
    421         /** TR0-TR7  (no defines for these). */
    422         uint8_t     reg_test;
    423         /** DISCREG_XXX */
    424         uint8_t     reg_ctrl;
    425         /** DISDREG_XXX */
    426         uint8_t     reg_dbg;
    427     } base;
     416        /** General register index (DISGREG_XXX), applicable if DISUSE_REG_GEN8,
     417         * DISUSE_REG_GEN16, DISUSE_REG_GEN32 or DISUSE_REG_GEN64 is set in fUse. */
     418        uint8_t     idxGenReg;
     419        /** FPU stack register index (DISFPREG_XXX), applicable if DISUSE_REG_FP is
     420         * set in fUse.  1:1 indexes. */
     421        uint8_t     idxFpuReg;
     422        /** MMX register index (DISMREG_XXX), applicable if DISUSE_REG_MMX is
     423         * set in fUse.  1:1 indexes. */
     424        uint8_t     idxMmxReg;
     425        /** SSE register index (DISXREG_XXX), applicable if DISUSE_REG_XMM is
     426         * set in fUse.  1:1 indexes. */
     427        uint8_t     idxXmmReg;
     428        /** Segment register index (DISSELREG_XXX), applicable if DISUSE_REG_SEG is
     429         * set in fUse. */
     430        uint8_t     idxSegReg;
     431        /** Test register, TR0-TR7, present on early IA32 CPUs, applicable if
     432         * DISUSE_REG_TEST is set in fUse.  No index defines for these. */
     433        uint8_t     idxTestReg;
     434        /** Control register index (DISCREG_XXX), applicable if DISUSE_REG_CR is
     435         * set in fUse.  1:1 indexes. */
     436        uint8_t     idxCtrlReg;
     437        /** Debug register index (DISDREG_XXX), applicable if DISUSE_REG_DBG is
     438         * set in fUse.  1:1 indexes. */
     439        uint8_t     idxDbgReg;
     440    } Base;
    428441    /** The SIB index register meaning, applicable if DISUSE_INDEX is
    429442     * set in fUse. */
     
    438451    /** Parameter size. */
    439452    uint8_t         cb;
     453    /** Copy of the corresponding DISOPCODE::fParam1 / DISOPCODE::fParam2 /
     454     * DISOPCODE::fParam3. */
     455    uint32_t        fParam;
    440456} DISOPPARAM;
    441457AssertCompileSize(DISOPPARAM, 32);
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