Changeset 41731 in vbox for trunk/include/VBox/dis.h
- Timestamp:
- Jun 14, 2012 11:41:13 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 78539
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/dis.h
r41730 r41731 382 382 /** @} */ 383 383 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 /** @} */401 402 typedef struct403 {404 union405 {406 uint8_t val8;407 uint16_t val16;408 uint32_t val32;409 uint64_t val64;410 411 struct412 {413 uint16_t sel;414 uint32_t offset;415 } farptr;416 } val;417 418 uint8_t type;419 uint8_t size;420 uint8_t flags;421 } DISQPVPARAMVAL;422 /** Pointer to opcode parameter value. */423 typedef DISQPVPARAMVAL *PDISQPVPARAMVAL;424 425 /** Indicates which parameter DISQueryParamVal should operate on. */426 typedef enum DISQPVWHICH427 {428 DISQPVWHICH_DST = 1,429 DISQPVWHICH_SRC,430 DISQPVWHAT_32_BIT_HACK = 0x7fffffff431 } DISQPVWHICH;432 433 384 434 385 /** … … 516 467 * 517 468 * @param pDisState Pointer to the CPU state. The primary user argument 518 * can be retrived from DISCPUSTATE:: apvUserData[0]. If469 * can be retrived from DISCPUSTATE::pvUser. If 519 470 * more is required these can be passed in the 520 471 * subsequent slots. … … 540 491 typedef struct DISCPUSTATE 541 492 { 542 /* Because of apvUserData[1] and apvUserData[2], put the less frequently543 used bits at the top for now.(Might be better off in the middle?) */493 /* Because of pvUser2, put the less frequently used bits at the top for 494 now. (Might be better off in the middle?) */ 544 495 DISOPPARAM param3; 545 496 DISOPPARAM param2; … … 628 579 uint8_t abInstr[16]; 629 580 /* off: 0x0b0 (176) */ 630 /** User data slots for the read callback. The first entry is used for the 631 * pvUser argument, the rest are up for grabs. 632 * @remarks This must come last so that we can memset everything before this. */ 633 void *apvUserData[3]; 581 /** User data supplied as an argument to the APIs. */ 582 void *pvUser; 634 583 #if ARCH_BITS == 32 635 uint32_t auPadding4[3]; 584 uint32_t uPadding4; 585 #endif 586 /** User data that can be set prior to calling the API. 587 * @deprecated Please don't use this any more. */ 588 void *pvUser2; 589 #if ARCH_BITS == 32 590 uint32_t uPadding5; 636 591 #endif 637 592 } DISCPUSTATE; … … 655 610 656 611 DISDECL(int) DISGetParamSize(PDISCPUSTATE pCpu, PDISOPPARAM pParam); 657 DISDECL(DISSELREG) DISDetectSegReg(PDISCPUSTATE pCpu, PDISOPPARAM pParam);612 DISDECL(DISSELREG) DISDetectSegReg(PDISCPUSTATE pCpu, PDISOPPARAM pParam); 658 613 DISDECL(uint8_t) DISQuerySegPrefixByte(PDISCPUSTATE pCpu); 659 614 615 616 617 /** @name Flags returned by DISQueryParamVal (DISQPVPARAMVAL::flags). 618 * @{ 619 */ 620 #define DISQPV_FLAG_8 UINT8_C(0x01) 621 #define DISQPV_FLAG_16 UINT8_C(0x02) 622 #define DISQPV_FLAG_32 UINT8_C(0x04) 623 #define DISQPV_FLAG_64 UINT8_C(0x08) 624 #define DISQPV_FLAG_FARPTR16 UINT8_C(0x10) 625 #define DISQPV_FLAG_FARPTR32 UINT8_C(0x20) 626 /** @} */ 627 628 /** @name Types returned by DISQueryParamVal (DISQPVPARAMVAL::flags). 629 * @{ */ 630 #define DISQPV_TYPE_REGISTER UINT8_C(1) 631 #define DISQPV_TYPE_ADDRESS UINT8_C(2) 632 #define DISQPV_TYPE_IMMEDIATE UINT8_C(3) 633 /** @} */ 634 635 typedef struct 636 { 637 union 638 { 639 uint8_t val8; 640 uint16_t val16; 641 uint32_t val32; 642 uint64_t val64; 643 644 struct 645 { 646 uint16_t sel; 647 uint32_t offset; 648 } farptr; 649 } val; 650 651 uint8_t type; 652 uint8_t size; 653 uint8_t flags; 654 } DISQPVPARAMVAL; 655 /** Pointer to opcode parameter value. */ 656 typedef DISQPVPARAMVAL *PDISQPVPARAMVAL; 657 658 /** Indicates which parameter DISQueryParamVal should operate on. */ 659 typedef enum DISQPVWHICH 660 { 661 DISQPVWHICH_DST = 1, 662 DISQPVWHICH_SRC, 663 DISQPVWHAT_32_BIT_HACK = 0x7fffffff 664 } DISQPVWHICH; 660 665 DISDECL(int) DISQueryParamVal(PCPUMCTXCORE pCtx, PDISCPUSTATE pCpu, PDISOPPARAM pParam, PDISQPVPARAMVAL pParamVal, DISQPVWHICH parmtype); 666 661 667 DISDECL(int) DISQueryParamRegPtr(PCPUMCTXCORE pCtx, PDISCPUSTATE pCpu, PDISOPPARAM pParam, void **ppReg, size_t *pcbSize); 662 663 668 DISDECL(int) DISFetchReg8(PCCPUMCTXCORE pCtx, unsigned reg8, uint8_t *pVal); 664 669 DISDECL(int) DISFetchReg16(PCCPUMCTXCORE pCtx, unsigned reg16, uint16_t *pVal);
Note:
See TracChangeset
for help on using the changeset viewer.