Changeset 92809 in vbox for trunk/include/VBox
- Timestamp:
- Dec 8, 2021 10:50:51 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 148729
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/dis.h
r92805 r92809 485 485 486 486 487 #if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && defined(DIS_CORE_ONLY) 488 # define DISOPCODE_BITFIELD(a_cBits) : a_cBits 489 #else 490 # define DISOPCODE_BITFIELD(a_cBits) 491 #endif 492 487 493 /** 488 494 * Opcode descriptor. 489 495 */ 490 #if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && defined(DIS_CORE_ONLY) 491 # pragma pack(1) 492 #endif 496 #if !defined(DIS_CORE_ONLY) || defined(DOXYGEN_RUNNING) 493 497 typedef struct DISOPCODE 494 498 { 495 #ifndef DIS_CORE_ONLY 499 # define DISOPCODE_FORMAT 0 500 /** Mnemonic and operand formatting. */ 496 501 const char *pszOpcode; 497 #endif498 502 /** Parameter \#1 parser index. */ 499 503 uint8_t idxParse1; … … 515 519 /** Parameter \#4 info, @see grp_dis_opparam. */ 516 520 uint16_t fParam4; 517 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || !defined(DIS_CORE_ONLY)518 521 /** padding unused */ 519 522 uint16_t uPadding; 520 #endif521 523 /** Operand type flags, DISOPTYPE_XXX. */ 522 524 uint32_t fOpType; 523 525 } DISOPCODE; 524 #if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && defined(DIS_CORE_ONLY) 526 #else 527 # pragma pack(1) 528 typedef struct DISOPCODE 529 { 530 #if 1 /*!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64) - probably not worth it for ~4K, costs 2-3% speed. */ 531 /* 16 bytes (trick is to make sure the bitfields doesn't cross dwords): */ 532 # define DISOPCODE_FORMAT 16 533 uint32_t fOpType; 534 uint16_t uOpcode; 535 uint8_t idxParse1; 536 uint8_t idxParse2; 537 uint32_t fParam1 : 12; /* 1st dword: 12+12+8 = 0x20 (32) */ 538 uint32_t fParam2 : 12; 539 uint32_t idxParse3 : 8; 540 uint32_t fParam3 : 12; /* 2nd dword: 12+12+8 = 0x20 (32) */ 541 uint32_t fParam4 : 12; 542 uint32_t idxParse4 : 8; 543 #else /* 15 bytes: */ 544 # define DISOPCODE_FORMAT 15 545 uint64_t uOpcode : 10; /* 1st qword: 10+12+12+12+6+6+6 = 0x40 (64) */ 546 uint64_t idxParse1 : 6; 547 uint64_t idxParse2 : 6; 548 uint64_t idxParse3 : 6; 549 uint64_t fParam1 : 12; 550 uint64_t fParam2 : 12; 551 uint64_t fParam3 : 12; 552 uint32_t fOpType; 553 uint16_t fParam4; 554 uint8_t idxParse4; 555 #endif 556 } DISOPCODE; 525 557 # pragma pack() 558 AssertCompile(sizeof(DISOPCODE) == DISOPCODE_FORMAT); 526 559 #endif 527 560 /** Pointer to const opcode. */ -
trunk/include/VBox/disopcode.h
r82968 r92809 807 807 }; 808 808 AssertCompile(OP_LOCK == 7); 809 AssertCompile(OP_END_OF_OPCODES < 1024 /* see 15 byte DISOPCODE variant */); 809 810 /** @} */ 810 811
Note:
See TracChangeset
for help on using the changeset viewer.