VirtualBox

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


Ignore:
Timestamp:
Jun 14, 2012 11:24:17 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
78537
Message:

DISQueryParamVal: renamed related types and constants and reduced the param structure by 8-12 bytes.

File:
1 edited

Legend:

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

    r41728 r41729  
    382382/** @}  */
    383383
    384 /** Used by DISQueryParamVal & EMIQueryParamVal
    385  * @{
    386  */
    387 #define PARAM_VAL8             RT_BIT(0)
    388 #define PARAM_VAL16            RT_BIT(1)
    389 #define PARAM_VAL32            RT_BIT(2)
    390 #define PARAM_VAL64            RT_BIT(3)
    391 #define PARAM_VALFARPTR16      RT_BIT(4)
    392 #define PARAM_VALFARPTR32      RT_BIT(5)
    393 
    394 #define PARMTYPE_REGISTER      1
    395 #define PARMTYPE_ADDRESS       2
    396 #define PARMTYPE_IMMEDIATE     3
     384/** @name Flags returned by DISQueryParamVal (DISQPVPARAMVAL::flags).
     385 * @{
     386 */
     387#define DISQPV_FLAG_8                   UINT8_C(0x01)
     388#define DISQPV_FLAG_16                  UINT8_C(0x02)
     389#define DISQPV_FLAG_32                  UINT8_C(0x04)
     390#define DISQPV_FLAG_64                  UINT8_C(0x08)
     391#define DISQPV_FLAG_FARPTR16            UINT8_C(0x10)
     392#define DISQPV_FLAG_FARPTR32            UINT8_C(0x20)
     393/** @}  */
     394
     395/** @name Types returned by DISQueryParamVal (DISQPVPARAMVAL::flags).
     396 * @{ */
     397#define DISQPV_TYPE_REGISTER            UINT8_C(1)
     398#define DISQPV_TYPE_ADDRESS             UINT8_C(2)
     399#define DISQPV_TYPE_IMMEDIATE           UINT8_C(3)
     400/** @}  */
    397401
    398402typedef struct
    399403{
    400     uint32_t        type;
    401     uint32_t        size;
    402     uint64_t        flags;
    403 
    404404    union
    405405    {
     
    416416    } val;
    417417
    418 } OP_PARAMVAL;
     418    uint8_t         type;
     419    uint8_t         size;
     420    uint8_t         flags;
     421} DISQPVPARAMVAL;
    419422/** Pointer to opcode parameter value. */
    420 typedef OP_PARAMVAL *POP_PARAMVAL;
    421 
    422 typedef enum
     423typedef DISQPVPARAMVAL *PDISQPVPARAMVAL;
     424
     425/** Indicates which parameter DISQueryParamVal should operate on. */
     426typedef enum DISQPVWHICH
    423427{
    424     PARAM_DEST,
    425     PARAM_SOURCE
    426 } PARAM_TYPE;
    427 
    428 /** @} */
     428    DISQPVWHICH_DST = 1,
     429    DISQPVWHICH_SRC,
     430    DISQPVWHAT_32_BIT_HACK = 0x7fffffff
     431} DISQPVWHICH;
     432
    429433
    430434/**
     
    649653DISDECL(uint8_t)    DISQuerySegPrefixByte(PDISCPUSTATE pCpu);
    650654
    651 DISDECL(int) DISQueryParamVal(PCPUMCTXCORE pCtx, PDISCPUSTATE pCpu, PDISOPPARAM pParam, POP_PARAMVAL pParamVal, PARAM_TYPE parmtype);
     655DISDECL(int) DISQueryParamVal(PCPUMCTXCORE pCtx, PDISCPUSTATE pCpu, PDISOPPARAM pParam, PDISQPVPARAMVAL pParamVal, DISQPVWHICH parmtype);
    652656DISDECL(int) DISQueryParamRegPtr(PCPUMCTXCORE pCtx, PDISCPUSTATE pCpu, PDISOPPARAM pParam, void **ppReg, size_t *pcbSize);
    653657
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