VirtualBox

Changeset 9387 in vbox


Ignore:
Timestamp:
Jun 4, 2008 1:51:21 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
31619
Message:

64-bit GC alignment fixes

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/dbgf.h

    r9212 r9387  
    595595    /** The breakpoint type. */
    596596    DBGFBPTYPE      enmType;
     597
     598#if GC_ARCH_BITS == 64
     599    uint32_t        u32Padding;
     600#endif
     601
    597602    /** Union of type specific data. */
    598603    union
  • trunk/include/VBox/patm.h

    r9344 r9387  
    111111    } Restore;
    112112
     113#if GC_ARCH_BITS == 64
     114    uint32_t        padding;
     115#endif
     116
    113117} PATMGCSTATE, *PPATMGCSTATE;
    114118
  • trunk/include/VBox/pdmqueue.h

    r9212 r9387  
    5555    /** Pointer to the next item in the pending list - GC Pointer. */
    5656    RCPTRTYPE(PPDMQUEUEITEMCORE)    pNextGC;
    57 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32
     57#if HC_ARCH_BITS == 64
    5858    uint32_t                        Alignment0;
    5959#endif
  • trunk/include/iprt/avl.h

    r9228 r9387  
    417417    /** Height of this tree: max(height(left), height(right)) + 1 */
    418418    unsigned char       uchHeight;
     419    unsigned char       padding[GC_ARCH_BITS == 64 ? 7 : 3];
    419420} AVLOGCPTRNODECORE, *PAVLOGCPTRNODECORE;
    420421
     
    518519    /** Height of this tree: max(height(left), height(right)) + 1 */
    519520    unsigned char       uchHeight;
     521    unsigned char       padding[GC_ARCH_BITS == 64 ? 7 : 3];
    520522} AVLROGCPTRNODECORE, *PAVLROGCPTRNODECORE;
    521523
  • trunk/src/VBox/Devices/PC/DevPIC.cpp

    r9212 r9387  
    120120    /** Pointer to the device instance, GCPtr. */
    121121    RCPTRTYPE(PPDMDEVINS)   pDevInsGC;
    122 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS != 64
    123     RTGCPTR                 Alignment0;
     122#if HC_ARCH_BITS == 64
     123    RTRCPTR                 Alignment0;
    124124#endif
    125125} PicState;
     
    138138    /** Pointer to the PIC GC helpers. */
    139139    PCPDMPICHLPGC           pPicHlpGC;
     140#if HC_ARCH_BITS == 32
     141    uint32_t                Alignmnet1;
     142#endif
    140143    /** Pointer to the device instance - GC Ptr. */
    141144    RCPTRTYPE(PPDMDEVINS)   pDevInsGC;
    142145    /** Pointer to the device instance - GC Ptr. */
    143146    R3R0PTRTYPE(PPDMDEVINS) pDevInsHC;
    144 #if HC_ARCH_BITS == 32
    145     uint32_t                Alignmnet0;
    146 #endif
    147147#ifdef VBOX_WITH_STATISTICS
    148148    STAMCOUNTER             StatSetIrqGC;
  • trunk/src/VBox/Devices/Serial/DevSerial.cpp

    r9212 r9387  
    124124    /** Pointer to the device instance. */
    125125    RCPTRTYPE(PPDMDEVINS)           pDevInsGC;
    126 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS != 64
    127     RTGCPTR                         Alignment0;
     126#if HC_ARCH_BITS == 64
     127    RTRCPTR                         Alignment0;
    128128#endif
    129129    /** The base interface. */
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r9212 r9387  
    178178    /** Pointer to the I/O buffer. */
    179179    RCPTRTYPE(uint8_t *) pbIOBufferGC;
    180 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS != 64
    181     RTGCPTR Aligmnent0; /**< Align the statistics at an 8-byte boundrary. */
     180#if HC_ARCH_BITS == 64
     181    RTRCPTR Aligmnent0; /**< Align the statistics at an 8-byte boundrary. */
    182182#endif
    183183
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeGC.cpp

    r9307 r9387  
    625625    GEN_CHECK_OFF(ATADevState, pbIOBufferHC);
    626626    GEN_CHECK_OFF(ATADevState, pbIOBufferGC);
     627    GEN_CHECK_OFF(ATADevState, StatATADMA);
    627628    GEN_CHECK_OFF(ATADevState, StatReads);
    628629    GEN_CHECK_OFF(ATADevState, StatBytesRead);
  • trunk/src/VBox/VMM/EMInternal.h

    r9212 r9387  
    275275#endif
    276276
     277    uint8_t                 u8Padding[GC_ARCH_BITS == 64 ? 6 : 2];
     278
    277279    /** Inhibit interrupts for this instruction. Valid only when VM_FF_INHIBIT_INTERRUPTS is set. */
    278280    RTGCUINTPTR             GCPtrInhibitInterrupts;
     
    337339    /** More statistics (GC). */
    338340    RCPTRTYPE(PEMSTATS)     pStatsGC;
    339 #if HC_ARCH_BITS != GC_ARCH_BITS && GC_ARCH_BITS == 32
    340     RTGCPTR                 padding0;
     341#if HC_ARCH_BITS == 64
     342    RTRCPTR                 padding0;
    341343#endif
    342344
  • trunk/src/VBox/VMM/IOMInternal.h

    r9282 r9387  
    8787    /** Pointer to fill (memset) callback function. */
    8888    RCPTRTYPE(PFNIOMMMIOFILL)   pfnFillCallbackGC;
    89     RTGCPTR                     GCPtrAlignment; /**< Alignment padding */
     89    /** Alignment padding. */
     90    RTRCPTR                     GCPtrAlignment;
    9091
    9192    /** Description / Name. For easing debugging. */
     
    150151    /** Avl node core with Port as Key and Port + cPorts - 1 as KeyLast. */
    151152    AVLROIOPORTNODECORE         Core;
    152 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32 && !defined(RT_OS_WINDOWS)
     153#if HC_ARCH_BITS == 64 && !defined(RT_OS_WINDOWS)
    153154    uint32_t                    u32Alignment; /**< The sizeof(Core) differs. */
    154155#endif
     
    182183    /** Avl node core with Port as Key and Port + cPorts - 1 as KeyLast. */
    183184    AVLROIOPORTNODECORE         Core;
    184 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32 && !defined(RT_OS_WINDOWS)
     185#if HC_ARCH_BITS == 64 && !defined(RT_OS_WINDOWS)
    185186    uint32_t                    u32Alignment; /**< The sizeof(Core) differs. */
    186187#endif
     
    230231    /** Pointer to string IN callback function. */
    231232    RCPTRTYPE(PFNIOMIOPORTINSTRING) pfnInStrCallback;
    232 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32
    233     RTGCPTR                     GCPtrAlignment; /**< pszDesc is 8 byte aligned. */
     233#if HC_ARCH_BITS == 64
     234    RTRCPTR                     GCPtrAlignment; /**< pszDesc is 8 byte aligned. */
    234235#endif
    235236    /** Description / Name. For easing debugging. */
     
    250251    /** Avl node core with the port as Key. */
    251252    AVLOIOPORTNODECORE          Core;
    252 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32 && !defined(RT_OS_WINDOWS)
     253#if HC_ARCH_BITS == 64 && !defined(RT_OS_WINDOWS)
    253254    uint32_t                    u32Alignment; /**< The sizeof(Core) differs. */
    254255#endif
     
    341342    /** The GC address of IOMMMIOHandler. */
    342343    RCPTRTYPE(PFNPGMGCPHYSHANDLER)  pfnMMIOHandlerGC;
     344#if GC_ARCH_BITS == 64
     345    RTRCPTR                         padding;
     346#endif
    343347    RTGCPTR                         Alignment;
    344348
  • trunk/src/VBox/VMM/MMInternal.h

    r9212 r9387  
    676676    /** The hypervisor heap (GC Ptr). */
    677677    RCPTRTYPE(PMMHYPERHEAP)     pHyperHeapGC;
     678#if HC_ARCH_BITS == 64
     679    uint32_t                    u32Padding2;
     680#endif
    678681    /** The hypervisor heap (HC Ptr). */
    679682    R3R0PTRTYPE(PMMHYPERHEAP)   pHyperHeapHC;
  • trunk/src/VBox/VMM/PATM/PATMInternal.h

    r9228 r9387  
    432432        RTGCPHYS            GCPhys;
    433433        RTRCPTR           pCachedData;
    434 #if GC_ARCH_BITS == 32
    435434        RTRCPTR           Alignment0; /**< Align the structure size on a 8-byte boundrary. */
    436 #endif
    437435    } mmio;
    438436
  • trunk/src/VBox/VMM/PDMInternal.h

    r9212 r9387  
    110110    /** GC pointer to associated PCI bus structure. */
    111111    RCPTRTYPE(PPDMPCIBUS)           pPciBusGC;
    112 #if GC_ARCH_BITS == 32
     112    /** Alignment padding. */
    113113    uint32_t                        Alignment0;
    114 #endif
    115114} PDMDEVINSINT;
    116115
     
    201200    /** Pointer to the VM - GCPtr. */
    202201    RCPTRTYPE(PVM)      pVMGC;
    203 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32
     202#if HC_ARCH_BITS == 64
    204203    uint32_t            padding;
    205204#endif
     
    375374    /** @copydoc PDMPICREG::pfnGetInterruptHC */
    376375    DECLGCCALLBACKMEMBER(int, pfnGetInterruptGC,(PPDMDEVINS pDevIns));
    377 #if GC_ARCH_BITS == 32
    378     RTGCPTR                         GCPtrPadding; /**< Alignment padding. */
    379 #endif
     376    /** Alignment padding. */
     377    RTRCPTR                 GCPtrPadding;
    380378} PDMPIC;
    381379
     
    433431    DECLGCCALLBACKMEMBER(void,      pfnBusDeliverGC,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
    434432                                                     uint8_t iVector, uint8_t u8Polarity, uint8_t u8TriggerMode));
    435 #if GC_ARCH_BITS == 32
    436     RTGCPTR                         GCPtrPadding; /**< Alignment padding. */
    437 #endif
     433    /** Alignment padding. */
     434    RTRCPTR                         GCPtrPadding;
    438435} PDMAPIC;
    439436
     
    671668        /** Pointer to the free item - GC Ptr. */
    672669        RCPTRTYPE(PPDMQUEUEITEMCORE) volatile   pItemGC;
    673 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32
     670#if HC_ARCH_BITS == 64
    674671        uint32_t                              Alignment0;
    675672#endif
  • trunk/src/VBox/VMM/PGMInternal.h

    r9212 r9387  
    312312    /** Pointer to next entry. */
    313313    RCPTRTYPE(struct PGMMAPPING *)  pNextGC;
     314#if GC_ARCH_BITS == 64
     315    RTRCPTR                         padding0;
     316#endif
    314317    /** Start Virtual address. */
    315318    RTGCUINTPTR                     GCPtr;
     
    326329    /** Number of page tables. */
    327330    RTUINT                          cPTs;
    328 #if HC_ARCH_BITS != GC_ARCH_BITS
    329     RTUINT                          uPadding0; /**< Alignment padding. */
     331#if HC_ARCH_BITS != GC_ARCH_BITS || GC_ARCH_BITS == 64
     332    RTUINT                          uPadding1; /**< Alignment padding. */
    330333#endif
    331334    /** Array of page table mapping data. Each entry
     
    440443    /** Number of cache pages. */
    441444    uint32_t                            cPages;
    442 
     445#if GC_ARCH_BITS == 64
     446    uint32_t                            padding0;
     447#endif
    443448/** @todo The next two members are redundant. It adds some readability though. */
    444449    /** Start of the range. */
     
    450455    /** Pointer to the GC callback function. */
    451456    RCPTRTYPE(PFNPGMGCVIRTHANDLER)      pfnHandlerGC;
     457#if GC_ARCH_BITS == 64
     458    RTRCPTR                             padding1;
     459#endif
    452460    /** Pointer to the HC callback function for invalidation. */
    453461    R3PTRTYPE(PFNPGMHCVIRTINVALIDATE)   pfnInvalidateHC;
     
    910918    /** Pointer to the next RAM range - for GC. */
    911919    RCPTRTYPE(struct PGMRAMRANGE *)     pNextGC;
    912 #if GC_ARCH_BITS == 32
    913920    /** Pointer alignment. */
    914     RTGCPTR                             GCPtrAlignment;
    915 #endif
     921    RTRCPTR                             GCPtrAlignment;
    916922    /** Start of the range. Page aligned. */
    917923    RTGCPHYS                            GCPhys;
     
    9961002    /** Pointer to the next range - GC. */
    9971003    RCPTRTYPE(struct PGMROMRANGE *) pNextGC;
    998 #if GC_ARCH_BITS == 32
    999     RTGCPTR                         GCPtrAlignment; /**< Pointer alignment. */
    1000 #endif
     1004    /** Pointer alignment */
     1005    RTRCPTR                         GCPtrAlignment;
    10011006    /** Address of the range. */
    10021007    RTGCPHYS                        GCPhys;
     
    16241629     * The Id is the index into thist array.
    16251630     */
     1631#if GC_ARCH_BITS == 64
     1632    uint32_t        Alignment4;
     1633#endif
    16261634    PGMPOOLPAGE     aPages[PGMPOOL_IDX_FIRST];
    16271635} PGMPOOL, *PPGMPOOL, **PPPGMPOOL;
     
    19081916     * are used of the PDs in PAE mode. */
    19091917    RTGCPTR                     GCPtrCR3Mapping;
    1910 #if HC_ARCH_BITS == 64
     1918#if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32
    19111919    uint32_t                    u32Alignment;
    19121920#endif
     
    19551963    /** The 32-Bit PD - GC Ptr. */
    19561964    RCPTRTYPE(PX86PD)           pGC32BitPD;
    1957 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32
     1965#if HC_ARCH_BITS == 64
    19581966    uint32_t                    u32Padding1; /**< alignment padding. */
    19591967#endif
     
    19851993     * Extends PAE Paging.
    19861994     * @{ */
    1987 #if GC_ARCH_BITS == 32 && HC_ARCH_BITS == 64
    1988     RTGCPTR                    alignment5; /**< structure size alignment. */
     1995#if HC_ARCH_BITS == 64
     1996    RTRCPTR                    alignment5; /**< structure size alignment. */
    19891997#endif
    19901998    /** The Page Map Level 4 table - HC Ptr. */
     
    20362044    RCPTRTYPE(PFNPGMGCPHYSHANDLER)  pfnGCGstWriteHandlerCR3;
    20372045    RCPTRTYPE(PFNPGMGCPHYSHANDLER)  pfnGCGstPAEWriteHandlerCR3;
    2038 #if GC_ARCH_BITS == 32 && HC_ARCH_BITS == 64
    2039     RTGCPTR                         alignment3; /**< structure size alignment. */
     2046#if HC_ARCH_BITS == 64
     2047    RTRCPTR                         alignment3; /**< structure size alignment. */
    20402048#endif
    20412049
     
    20782086    DECLGCCALLBACKMEMBER(int,       pfnGCBthVerifyAccessSyncPage,(PVM pVM, RTGCUINTPTR GCPtrPage, unsigned fFlags, unsigned uError));
    20792087    DECLGCCALLBACKMEMBER(unsigned,  pfnGCBthAssertCR3,(PVM pVM, uint64_t cr3, uint64_t cr4, RTGCUINTPTR GCPtr, RTGCUINTPTR cb));
    2080 #if GC_ARCH_BITS == 32 && HC_ARCH_BITS == 64
    2081     RTGCPTR                         alignment2; /**< structure size alignment. */
     2088#if HC_ARCH_BITS == 64
     2089    RTRCPTR                         alignment2; /**< structure size alignment. */
    20822090#endif
    20832091    /** @} */
     
    21052113    RCPTRTYPE(PPGMRAMRANGE)         pRomRangesGC;
    21062114    /** Alignment padding. */
    2107     RTGCPTR                         GCPtrPadding2;
     2115    RTRCPTR                         GCPtrPadding2;
    21082116
    21092117    /** Pointer to the list of MMIO2 ranges - for R3.
  • trunk/src/VBox/VMM/SELMInternal.h

    r9288 r9387  
    103103    /** GC Pointer to the LDT shadow area placed in Hypervisor memory arena. */
    104104    RCPTRTYPE(void *)       GCPtrLdt;
     105#if GC_ARCH_BITS == 64
     106    RTRCPTR                 padding0;
     107#endif
    105108    /** GC Pointer to the current Guest's LDT. */
    106109    RTGCPTR                 GCPtrGuestLdt;
     
    123126    /** GC Pointer to the TSS shadow area (Tss) placed in Hypervisor memory arena. */
    124127    RCPTRTYPE(void *)       GCPtrTss;
     128#if GC_ARCH_BITS == 64
     129    RTRCPTR                 padding1;
     130#endif
    125131    /** GC Pointer to the current Guest's TSS. */
    126132    RTGCPTR                 GCPtrGuestTss;
  • trunk/src/VBox/VMM/TMInternal.h

    r9379 r9387  
    184184    /** Pointer to the VM the timer belongs to - RC Ptr. */
    185185    PVMRC                   pVMGC;
    186 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32
    187     RTGCPTR                 padding0; /**< pad structure to multiple of 8 bytes. */
     186#if HC_ARCH_BITS == 64
     187    RTRCPTR                 padding0; /**< pad structure to multiple of 8 bytes. */
    188188#endif
    189189} TMTIMER;
  • trunk/src/VBox/VMM/VMMInternal.h

    r9244 r9387  
    188188    /** The last GC return code. */
    189189    RTINT                       iLastGCRc;
    190 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32
     190#if HC_ARCH_BITS == 64
    191191    uint32_t                    u32Padding0; /**< Alignment padding. */
    192192#endif
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