Changeset 101547 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Oct 23, 2023 12:50:37 AM (15 months ago)
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInternal.h
r101543 r101547 879 879 { 880 880 kIemTbDbgEntryType_Invalid = 0, 881 /** The entry is for marking a native code position. 882 * Entries following this all apply to this position. */ 883 kIemTbDbgEntryType_NativeOffset, 881 884 /** The entry is for a new guest instruction. */ 882 885 kIemTbDbgEntryType_GuestInstruction, 883 /** Marks the start of a nativecall. */884 kIemTbDbgEntryType_ThreadedCall 1,885 /** 2nd entry for the start of a native call. */886 kIemTbDbgEntryType_ ThreadedCall2,886 /** Marks the start of a threaded call. */ 887 kIemTbDbgEntryType_ThreadedCall, 888 /** Marks the location of a label. */ 889 kIemTbDbgEntryType_Label, 887 890 /** Info about a host register shadowing a guest register. */ 888 kIemTbDbgEntryType_GuestRegShadow ,891 kIemTbDbgEntryType_GuestRegShadowing, 889 892 kIemTbDbgEntryType_End 890 893 } IEMTBDBGENTRYTYPE; … … 908 911 struct 909 912 { 910 /** kIemTbDbgEntryType_GuestInstruction. */911 uint32_t uType : 4;912 /** Index into IEMTB::aRanges. */913 uint32_t idxRange : 4;914 /** Offset relative to the start of the range. */915 uint32_t offOpcodes : 12;916 /** Number of opcode bytes for the instruction. */917 uint32_t cbOpcodes : 4;918 /** Basic CPU mode for the disassembler (low 8 bits IEM_F_XXX). */919 uint32_t fCpuMode : 8;920 } GuestInstruction;921 922 struct923 {924 913 /** kIemTbDbgEntryType_ThreadedCall1. */ 925 914 uint32_t uType : 4; 926 915 /** Native code offset. */ 927 916 uint32_t offNative : 28; 928 } ThreadedCall1;917 } NativeOffset; 929 918 930 919 struct 931 920 { 932 /* kIemTbDbgEntryType_ThreadedCall2. */921 /** kIemTbDbgEntryType_GuestInstruction. */ 933 922 uint32_t uType : 4; 923 uint32_t uUnused : 4; 924 /** The IEM_F_XXX flags. */ 925 uint32_t fExec : 24; 926 } GuestInstruction; 927 928 struct 929 { 930 /* kIemTbDbgEntryType_ThreadedCall. */ 931 uint32_t uType : 4; 932 uint32_t uUnused : 12; 934 933 /** The threaded call number (IEMTHREADEDFUNCS). */ 935 934 uint32_t enmCall : 16; 936 } ThreadedCall 2;935 } ThreadedCall; 937 936 938 937 struct 939 938 { 940 /* kIemTbDbgEntryType_ GuestRegShadow. */939 /* kIemTbDbgEntryType_Label. */ 941 940 uint32_t uType : 4; 942 uint32_t uPadding : 4; 943 /** The host register number. */ 944 uint32_t idxHstReg : 8; 941 uint32_t uUnused : 4; 942 /** The label type (IEMNATIVELABELTYPE). */ 943 uint32_t enmLabel : 8; 944 /** The label data. */ 945 uint32_t uData : 16; 946 } Label; 947 948 struct 949 { 950 /* kIemTbDbgEntryType_GuestRegShadowing. */ 951 uint32_t uType : 4; 952 uint32_t uUnused : 4; 945 953 /** The guest register being shadowed (IEMNATIVEGSTREG). */ 946 uint32_t idxGstReg : 8; 947 uint32_t uUnused : 8; 948 } GuestRegShadow; 954 uint32_t idxGstReg : 8; 955 /** The host new register number, UINT8_MAX if dropped. */ 956 uint32_t idxHstReg : 8; 957 /** The previous host register number, UINT8_MAX if new. */ 958 uint32_t idxHstRegPrev : 8; 959 } GuestRegShadowing; 949 960 } IEMTBDBGENTRY; 950 961 AssertCompileSize(IEMTBDBGENTRY, sizeof(uint32_t)); 962 /** Pointer to a debug info entry. */ 963 typedef IEMTBDBGENTRY *PIEMTBDBGENTRY; 964 /** Pointer to a const debug info entry. */ 965 typedef IEMTBDBGENTRY const *PCIEMTBDBGENTRY; 951 966 952 967 /** … … 957 972 /** Number of entries in aEntries. */ 958 973 uint32_t cEntries; 959 /** Number of entries we've allocated. */960 uint32_t cAllocated;961 974 /** Debug info entries. */ 962 975 RT_FLEXIBLE_ARRAY_EXTENSION -
trunk/src/VBox/VMM/include/IEMN8veRecompiler.h
r101537 r101547 37 37 * @{ 38 38 */ 39 40 /** @def IEMNATIVE_WITH_TB_DEBUG_INFO 41 * Enables generating internal debug info for better TB disassembly dumping. */ 42 #if defined(DEBUG) || defined(DOXYGEN_RUNNING) 43 # define IEMNATIVE_WITH_TB_DEBUG_INFO 44 #endif 45 39 46 40 47 /** @name Stack Frame Layout … … 518 525 PIEMNATIVEFIXUP paFixups; 519 526 527 #ifdef IEMNATIVE_WITH_TB_DEBUG_INFO 528 /** Number of debug info entries allocated for pDbgInfo. */ 529 uint32_t cDbgInfoAlloc; 530 uint32_t uPadding; 531 /** Debug info. */ 532 PIEMTBDBG pDbgInfo; 533 #else 534 uint32_t abPadding1[2]; 535 uintptr_t uPtrPadding2; 536 #endif 537 520 538 /** The translation block being recompiled. */ 521 539 PCIEMTB pTbOrg; … … 586 604 587 605 588 DECLHIDDEN(uint32_t) iemNativeMakeLabel(PIEMRECOMPILERSTATE pReNative, IEMNATIVELABELTYPE enmType, 589 uint32_t offWhere = UINT32_MAX, uint16_t uData = 0) RT_NOEXCEPT; 606 DECLHIDDEN(uint32_t) iemNativeLabelCreate(PIEMRECOMPILERSTATE pReNative, IEMNATIVELABELTYPE enmType, 607 uint32_t offWhere = UINT32_MAX, uint16_t uData = 0) RT_NOEXCEPT; 608 DECLHIDDEN(void) iemNativeLabelDefine(PIEMRECOMPILERSTATE pReNative, uint32_t idxLabel, uint32_t offWhere) RT_NOEXCEPT; 590 609 DECLHIDDEN(bool) iemNativeAddFixup(PIEMRECOMPILERSTATE pReNative, uint32_t offWhere, uint32_t idxLabel, 591 610 IEMNATIVEFIXUPTYPE enmType, int8_t offAddend = 0) RT_NOEXCEPT; … … 1762 1781 pbCodeBuf[off++] = 0xeb; /* jmp rel8 */ 1763 1782 pbCodeBuf[off++] = (uint8_t)offRel; 1764 off++;1765 1783 } 1766 1784 else … … 1810 1828 IEMNATIVELABELTYPE enmLabelType, uint16_t uData = 0) 1811 1829 { 1812 uint32_t const idxLabel = iemNative MakeLabel(pReNative, enmLabelType, UINT32_MAX /*offWhere*/, uData);1830 uint32_t const idxLabel = iemNativeLabelCreate(pReNative, enmLabelType, UINT32_MAX /*offWhere*/, uData); 1813 1831 AssertReturn(idxLabel != UINT32_MAX, UINT32_MAX); 1814 1832 return iemNativeEmitJmpToLabel(pReNative, off, idxLabel); … … 1883 1901 IEMNATIVELABELTYPE enmLabelType, uint16_t uData, IEMNATIVEINSTRCOND enmCond) 1884 1902 { 1885 uint32_t const idxLabel = iemNative MakeLabel(pReNative, enmLabelType, UINT32_MAX /*offWhere*/, uData);1903 uint32_t const idxLabel = iemNativeLabelCreate(pReNative, enmLabelType, UINT32_MAX /*offWhere*/, uData); 1886 1904 AssertReturn(idxLabel != UINT32_MAX, UINT32_MAX); 1887 1905 return iemNativeEmitJccToLabel(pReNative, off, idxLabel, enmCond);
Note:
See TracChangeset
for help on using the changeset viewer.