VirtualBox

Changeset 41668 in vbox for trunk/include


Ignore:
Timestamp:
Jun 12, 2012 1:15:51 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
78475
Message:

DIS,DIS-users: Drop the operand/parameter formatting during instruction parsing. The desired formatter can do this afterwards if desired. Should save time + size. (DISCPUSTATE is now 256 bytes here on 64-bit linux, was ~406 yesterday.)

File:
1 edited

Legend:

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

    r41663 r41668  
    3131#include <VBox/disopcode.h>
    3232
    33 #if defined(__L4ENV__)
    34 # include <setjmp.h>
    35 #endif
    3633
    3734RT_C_DECLS_BEGIN
     
    412409    /** Parameter size. */
    413410    uint8_t         cb;
    414 
    415 #ifndef DIS_SEPARATE_FORMATTER
    416     char            szParam[32];
    417 #endif
    418411} OP_PARAMETER;
    419412/** Pointer to opcode parameter. */
     
    454447
    455448    /** Per instruction prefix settings. */
    456     uint32_t        prefix;
     449    uint32_t        prefix;  /**< @todo change to uint8_t */
    457450    /** segment prefix value. */
    458451    DIS_SELREG      enmPrefixSeg;
    459452    /** rex prefix value (64 bits only */
    460     uint32_t        prefix_rex;
     453    uint32_t        prefix_rex; /**< @todo change to uint8_t */
    461454    /** addressing mode (16 or 32 bits). (CPUMODE_*) */
    462455    DISCPUMODE      addrmode;
     
    501494    /** The address of the instruction. */
    502495    RTUINTPTR       uInstrAddr;
    503     /** The offsetted address of the instruction. */
    504     RTUINTPTR       opaddr;
    505496    /** The size of the prefix bytes. */
    506497    uint8_t         cbPrefix;
     
    559550
    560551
    561 DISDECL(int) DISInstr(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, PDISCPUSTATE pCpu, uint32_t *pcbSize, char *pszOutput);
    562 DISDECL(int) DISInstrWithOff(PDISCPUSTATE pCpu, RTUINTPTR uInstrAddr, RTUINTPTR offRealAddr, uint32_t *pcbSize, char *pszOutput);
     552DISDECL(int) DISInstr(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput);
     553DISDECL(int) DISInstrWithOff(PDISCPUSTATE pCpu, RTUINTPTR uInstrAddr, RTUINTPTR offRealAddr, uint32_t *pcbInstr, char *pszOutput);
    563554DISDECL(int) DISInstrWithReader(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, PFNDISREADBYTES pfnReadBytes, void *pvUser,
    564                                 PDISCPUSTATE pCpu, uint32_t *pcbSize, char *pszOutput);
     555                                PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput);
    565556DISDECL(int) DISInstrEx(RTUINTPTR uInstrAddr, RTUINTPTR offRealAddr, DISCPUMODE enmCpuMode,
    566557                        PFNDISREADBYTES pfnReadBytes, void *pvUser, uint32_t uFilter,
    567                         PDISCPUSTATE pCpu, uint32_t *pcbSize, char *pszOutput);
    568 
    569 DISDECL(int) DISCoreOne(PDISCPUSTATE pCpu, RTUINTPTR InstructionAddr, uint32_t *pcbInstruction);
    570 DISDECL(int) DISCoreOneEx(RTUINTPTR InstructionAddr, DISCPUMODE enmCpuMode, PFNDISREADBYTES pfnReadBytes, void *pvUser,
    571                           PDISCPUSTATE pCpu, uint32_t *pcbInstruction);
     558                        PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput);
     559
     560DISDECL(int) DISCoreOne(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, PDISCPUSTATE pCpu, uint32_t *pcbInstr);
     561DISDECL(int) DISCoreOneWithReader(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, PFNDISREADBYTES pfnReadBytes, void *pvUser,
     562                                  PDISCPUSTATE pCpu, uint32_t *pcbInstr);
     563DISDECL(int) DISCoreOneExEx(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, uint32_t uFilter,
     564                            PFNDISREADBYTES pfnReadBytes, void *pvUser,
     565                            PDISCPUSTATE pCpu, uint32_t *pcbInstr);
    572566
    573567DISDECL(int)        DISGetParamSize(PDISCPUSTATE pCpu, POP_PARAMETER pParam);
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