VirtualBox

Changeset 99982 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
May 25, 2023 7:59:54 PM (22 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
157644
Message:

VMM/IEM: More plotting on the IEM recompiler. bugref:10369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r99930 r99982  
    600600     * This is set to a non-canonical address when we need to invalidate it. */
    601601    uint64_t                uInstrBufPc;                                                                    /* 0x18 */
     602    /** The guest physical address corresponding to pbInstrBuf. */
     603    RTGCPHYS                GCPhysInstrBuf;                                                                 /* 0x20 */
    602604    /** The number of bytes available at pbInstrBuf in total (for IEMExecLots).
    603605     * This takes the CS segment limit into account. */
    604     uint16_t                cbInstrBufTotal;                                                                /* 0x20 */
     606    uint16_t                cbInstrBufTotal;                                                                /* 0x28 */
    605607    /** Offset into pbInstrBuf of the first byte of the current instruction.
    606608     * Can be negative to efficiently handle cross page instructions. */
    607     int16_t                 offCurInstrStart;                                                               /* 0x22 */
     609    int16_t                 offCurInstrStart;                                                               /* 0x2a */
    608610
    609611    /** The prefix mask (IEM_OP_PRF_XXX). */
    610     uint32_t                fPrefixes;                                                                      /* 0x24 */
     612    uint32_t                fPrefixes;                                                                      /* 0x2c */
    611613    /** The extra REX ModR/M register field bit (REX.R << 3). */
    612     uint8_t                 uRexReg;                                                                        /* 0x28 */
     614    uint8_t                 uRexReg;                                                                        /* 0x30 */
    613615    /** The extra REX ModR/M r/m field, SIB base and opcode reg bit
    614616     * (REX.B << 3). */
    615     uint8_t                 uRexB;                                                                          /* 0x29 */
     617    uint8_t                 uRexB;                                                                          /* 0x31 */
    616618    /** The extra REX SIB index field bit (REX.X << 3). */
    617     uint8_t                 uRexIndex;                                                                      /* 0x2a */
     619    uint8_t                 uRexIndex;                                                                      /* 0x32 */
    618620
    619621    /** The effective segment register (X86_SREG_XXX). */
    620     uint8_t                 iEffSeg;                                                                        /* 0x2b */
     622    uint8_t                 iEffSeg;                                                                        /* 0x33 */
    621623
    622624    /** The offset of the ModR/M byte relative to the start of the instruction. */
    623     uint8_t                 offModRm;                                                                       /* 0x2c */
     625    uint8_t                 offModRm;                                                                       /* 0x34 */
    624626# else  /* !IEM_WITH_CODE_TLB */
    625627    /** The size of what has currently been fetched into abOpcode. */
     
    646648
    647649    /** The effective operand mode. */
    648     IEMMODE                 enmEffOpSize;                                                                   /* 0x2d, 0x13 */
     650    IEMMODE                 enmEffOpSize;                                                                   /* 0x35, 0x13 */
    649651    /** The default addressing mode. */
    650     IEMMODE                 enmDefAddrMode;                                                                 /* 0x2e, 0x14 */
     652    IEMMODE                 enmDefAddrMode;                                                                 /* 0x36, 0x14 */
    651653    /** The effective addressing mode. */
    652     IEMMODE                 enmEffAddrMode;                                                                 /* 0x2f, 0x15 */
     654    IEMMODE                 enmEffAddrMode;                                                                 /* 0x37, 0x15 */
    653655    /** The default operand mode. */
    654     IEMMODE                 enmDefOpSize;                                                                   /* 0x30, 0x16 */
     656    IEMMODE                 enmDefOpSize;                                                                   /* 0x38, 0x16 */
    655657
    656658    /** Prefix index (VEX.pp) for two byte and three byte tables. */
    657     uint8_t                 idxPrefix;                                                                      /* 0x31, 0x17 */
     659    uint8_t                 idxPrefix;                                                                      /* 0x39, 0x17 */
    658660    /** 3rd VEX/EVEX/XOP register.
    659661     * Please use IEM_GET_EFFECTIVE_VVVV to access.  */
    660     uint8_t                 uVex3rdReg;                                                                     /* 0x32, 0x18 */
     662    uint8_t                 uVex3rdReg;                                                                     /* 0x3a, 0x18 */
    661663    /** The VEX/EVEX/XOP length field. */
    662     uint8_t                 uVexLength;                                                                     /* 0x33, 0x19 */
     664    uint8_t                 uVexLength;                                                                     /* 0x3b, 0x19 */
    663665    /** Additional EVEX stuff. */
    664     uint8_t                 fEvexStuff;                                                                     /* 0x34, 0x1a */
     666    uint8_t                 fEvexStuff;                                                                     /* 0x3c, 0x1a */
    665667
    666668    /** Explicit alignment padding. */
    667     uint8_t                 abAlignment2a[1];                                                               /* 0x35, 0x1b */
     669    uint8_t                 abAlignment2a[1];                                                               /* 0x3d, 0x1b */
    668670    /** The FPU opcode (FOP). */
    669     uint16_t                uFpuOpcode;                                                                     /* 0x36, 0x1c */
     671    uint16_t                uFpuOpcode;                                                                     /* 0x3e, 0x1c */
    670672# ifndef IEM_WITH_CODE_TLB
    671673    /** Explicit alignment padding. */
     
    674676
    675677    /** The opcode bytes. */
    676     uint8_t                 abOpcode[15];                                                                   /* 0x48, 0x20 */
     678    uint8_t                 abOpcode[15];                                                                   /* 0x40, 0x20 */
    677679    /** Explicit alignment padding. */
    678680# ifdef IEM_WITH_CODE_TLB
    679     uint8_t                 abAlignment2c[0x48 - 0x47];                                                     /* 0x37 */
     681    //uint8_t                 abAlignment2c[0x4f - 0x4f];                                                     /* 0x4f */
    680682# else
    681     uint8_t                 abAlignment2c[0x48 - 0x2f];                                                     /*       0x2f */
     683    uint8_t                 abAlignment2c[0x4f - 0x2f];                                                     /*       0x2f */
    682684# endif
    683685#else  /* IEM_WITH_OPAQUE_DECODER_STATE */
    684     uint8_t                 abOpaqueDecoder[0x48 - 0x8];
     686    uint8_t                 abOpaqueDecoder[0x4f - 0x8];
    685687#endif /* IEM_WITH_OPAQUE_DECODER_STATE */
    686688    /** @} */
    687689
    688690
    689     /** The flags of the current exception / interrupt. */
    690     uint32_t                fCurXcpt;                                                                       /* 0x48, 0x48 */
    691     /** The current exception / interrupt. */
    692     uint8_t                 uCurXcpt;
    693     /** Exception / interrupt recursion depth. */
    694     int8_t                  cXcptRecursions;
    695 
    696691    /** The number of active guest memory mappings. */
    697     uint8_t                 cActiveMappings;
    698     /** The next unused mapping index. */
    699     uint8_t                 iNextMapping;
     692    uint8_t                 cActiveMappings;                                                                /* 0x4f, 0x4f */
     693
    700694    /** Records for tracking guest memory mappings. */
    701695    struct
    702696    {
    703697        /** The address of the mapped bytes. */
    704         void               *pv;
     698        R3R0PTRTYPE(void *) pv;
    705699        /** The access flags (IEM_ACCESS_XXX).
    706700         * IEM_ACCESS_INVALID if the entry is unused. */
     
    709703        uint32_t            u32Alignment4; /**< Alignment padding. */
    710704#endif
    711     } aMemMappings[3];
     705    } aMemMappings[3];                                                                                      /* 0x50 LB 0x30 */
    712706
    713707    /** Locking records for the mapped memory. */
     
    716710        PGMPAGEMAPLOCK      Lock;
    717711        uint64_t            au64Padding[2];
    718     } aMemMappingLocks[3];
     712    } aMemMappingLocks[3];                                                                                  /* 0x80 LB 0x30 */
    719713
    720714    /** Bounce buffer info.
     
    734728        /** Explicit alignment padding. */
    735729        bool                afAlignment5[3];
    736     } aMemBbMappings[3];
    737 
    738     /* Ensure that aBounceBuffers are aligned at a 32 byte boundrary. */
    739     uint64_t                abAlignment7[1];
     730    } aMemBbMappings[3];                                                                                    /* 0xb0 LB 0x48 */
     731
     732    /** The flags of the current exception / interrupt. */
     733    uint32_t                fCurXcpt;                                                                       /* 0xf8 */
     734    /** The current exception / interrupt. */
     735    uint8_t                 uCurXcpt;                                                                       /* 0xfc */
     736    /** Exception / interrupt recursion depth. */
     737    int8_t                  cXcptRecursions;                                                                /* 0xfb */
     738
     739    /** The next unused mapping index.
     740     * @todo try find room for this up with cActiveMappings. */
     741    uint8_t                 iNextMapping;                                                                   /* 0xfd */
     742    uint8_t                 abAlignment7[1];
    740743
    741744    /** Bounce buffer storage.
     
    744747    {
    745748        uint8_t             ab[512];
    746     } aBounceBuffers[3];
     749    } aBounceBuffers[3];                                                                                    /* 0x100 LB 0x600 */
    747750
    748751
     
    816819    uint8_t                 cLogRelWrMsr;
    817820    /** Alignment padding. */
    818     uint8_t                 abAlignment8[42];
     821    uint8_t                 abAlignment9[46];
    819822
    820823    /** @name Recompilation
     
    846849#endif
    847850} IEMCPU;
    848 AssertCompileMemberOffset(IEMCPU, fCurXcpt, 0x48);
    849 AssertCompileMemberAlignment(IEMCPU, aBounceBuffers, 8);
    850 AssertCompileMemberAlignment(IEMCPU, aBounceBuffers, 16);
    851 AssertCompileMemberAlignment(IEMCPU, aBounceBuffers, 32);
     851AssertCompileMemberOffset(IEMCPU, cActiveMappings, 0x4f);
     852AssertCompileMemberAlignment(IEMCPU, aMemMappings, 16);
     853AssertCompileMemberAlignment(IEMCPU, aMemMappingLocks, 16);
    852854AssertCompileMemberAlignment(IEMCPU, aBounceBuffers, 64);
    853855AssertCompileMemberAlignment(IEMCPU, DataTlb, 64);
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