Changeset 101539 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Oct 22, 2023 2:43:09 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInternal.h
r101538 r101539 814 814 /** Pointer to a native instruction unit. */ 815 815 typedef IEMNATIVEINSTR *PIEMNATIVEINSTR; 816 /** Pointer to a const native instruction unit. */ 817 typedef IEMNATIVEINSTR const *PCIEMNATIVEINSTR; 816 818 817 819 /** … … 869 871 * This will throw/longjmp on occation. */ 870 872 typedef FNIEMTBNATIVE *PFNIEMTBNATIVE; 873 874 875 /** 876 * Translation block debug info entry type. 877 */ 878 typedef enum IEMTBDBGENTRYTYPE 879 { 880 kIemTbDbgEntryType_Invalid = 0, 881 /** The entry is for a new guest instruction. */ 882 kIemTbDbgEntryType_GuestInstruction, 883 /** Marks the start of a native call. */ 884 kIemTbDbgEntryType_ThreadedCall1, 885 /** 2nd entry for the start of a native call. */ 886 kIemTbDbgEntryType_ThreadedCall2, 887 /** Info about a host register shadowing a guest register. */ 888 kIemTbDbgEntryType_GuestRegShadow, 889 kIemTbDbgEntryType_End 890 } IEMTBDBGENTRYTYPE; 891 892 /** 893 * Translation block debug info entry. 894 */ 895 typedef union IEMTBDBGENTRY 896 { 897 /** Plain 32-bit view. */ 898 uint32_t u; 899 900 /** Generic view for getting at the type field. */ 901 struct 902 { 903 /** IEMTBDBGENTRYTYPE */ 904 uint32_t uType : 4; 905 uint32_t uTypeSpecific : 28; 906 } Gen; 907 908 struct 909 { 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 struct 923 { 924 /** kIemTbDbgEntryType_ThreadedCall1. */ 925 uint32_t uType : 4; 926 /** Native code offset. */ 927 uint32_t offNative : 28; 928 } ThreadedCall1; 929 930 struct 931 { 932 /* kIemTbDbgEntryType_ThreadedCall2. */ 933 uint32_t uType : 4; 934 /** The threaded call number (IEMTHREADEDFUNCS). */ 935 uint32_t enmCall : 16; 936 } ThreadedCall2; 937 938 struct 939 { 940 /* kIemTbDbgEntryType_GuestRegShadow. */ 941 uint32_t uType : 4; 942 uint32_t uPadding : 4; 943 /** The host register number. */ 944 uint32_t idxHstReg : 8; 945 /** The guest register being shadowed (IEMNATIVEGSTREG). */ 946 uint32_t idxGstReg : 8; 947 uint32_t uUnused : 8; 948 } GuestRegShadow; 949 } IEMTBDBGENTRY; 950 AssertCompileSize(IEMTBDBGENTRY, sizeof(uint32_t)); 951 952 /** 953 * Translation block debug info. 954 */ 955 typedef struct IEMTBDBG 956 { 957 /** Number of entries in aEntries. */ 958 uint32_t cEntries; 959 /** Number of entries we've allocated. */ 960 uint32_t cAllocated; 961 /** Debug info entries. */ 962 RT_FLEXIBLE_ARRAY_EXTENSION 963 IEMTBDBGENTRY aEntries[RT_FLEXIBLE_ARRAY]; 964 } IEMTBDBG; 965 /** Pointer to TB debug info. */ 966 typedef IEMTBDBG *PIEMTBDBG; 967 /** Pointer to const TB debug info. */ 968 typedef IEMTBDBG const *PCIEMTBDBG; 871 969 872 970 … … 945 1043 uint8_t *pabOpcodes; 946 1044 947 /** Debug info or smth. */ 948 void *pvDbg; 1045 /** Debug info if enabled. 1046 * This is only generated by the native recompiler. */ 1047 PIEMTBDBG pDbgInfo; 949 1048 950 1049 /* --- 64 byte cache line end --- */ … … 981 1080 * The GCPhysPc w/o page offset is element zero, so starting here with 1. */ 982 1081 RTGCPHYS aGCPhysPages[2]; 983 984 1082 } IEMTB; 985 1083 #pragma pack() … … 987 1085 AssertCompileMemberAlignment(IEMTB, Thrd, sizeof(void *)); 988 1086 AssertCompileMemberAlignment(IEMTB, pabOpcodes, sizeof(void *)); 989 AssertCompileMemberAlignment(IEMTB, p vDbg, sizeof(void *));1087 AssertCompileMemberAlignment(IEMTB, pDbgInfo, sizeof(void *)); 990 1088 AssertCompileMemberAlignment(IEMTB, aGCPhysPages, sizeof(RTGCPHYS)); 991 1089 AssertCompileMemberOffset(IEMTB, aRanges[0], 64);
Note:
See TracChangeset
for help on using the changeset viewer.