VirtualBox

Changeset 9212 in vbox for trunk/include/iprt/types.h


Ignore:
Timestamp:
May 29, 2008 9:38:38 AM (17 years ago)
Author:
vboxsync
Message:

Major changes for sizeof(RTGCPTR) == uint64_t.
Introduced RCPTRTYPE for pointers valid in raw mode only (RTGCPTR32).

Disabled by default. Enable by adding VBOX_WITH_64_BITS_GUESTS to your LocalConfig.kmk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/types.h

    r9145 r9212  
    707707
    708708/** Natural signed integer in the GC. */
     709#if GC_ARCH_BITS == 32
    709710typedef int32_t         RTGCINT;
     711#elif GC_ARCH_BITS == 64
     712typedef int64_t         RTGCINT;
     713#endif
    710714/** Pointer to natural signed interger in GC. */
    711715typedef RTGCINT        *PRTGCINT;
     
    713717typedef const RTGCINT  *PCRTGCINT;
    714718
    715 /** Natural signed uninteger in the GC. */
     719/** Natural unsigned integer in the GC. */
     720#if GC_ARCH_BITS == 32
    716721typedef uint32_t        RTGCUINT;
    717 /** Pointer to natural unsigned interger in GC. */
     722#elif GC_ARCH_BITS == 64
     723typedef uint64_t        RTGCUINT;
     724#endif
     725/** Pointer to natural unsigned integer in GC. */
    718726typedef RTGCUINT       *PRTGCUINT;
    719 /** Pointer to const natural unsigned interger in GC. */
     727/** Pointer to const natural unsigned integer in GC. */
    720728typedef const RTGCUINT *PCRTGCUINT;
    721729
     
    725733#elif GC_ARCH_BITS == 64
    726734typedef int64_t         RTGCINTPTR;
    727 #else
    728 #  error Unsupported GC_ARCH_BITS value.
    729735#endif
    730736/** Pointer to signed interger which can contain a GC pointer. */
     
    808814 * HC and void pointer in GC.
    809815 */
    810 #ifdef IN_GC
    811 typedef void           *RTGCPTR32;
    812 #else
    813816typedef RTGCUINTPTR32   RTGCPTR32;
    814 #endif
    815817/** Pointer to a guest context pointer. */
    816818typedef RTGCPTR32      *PRTGCPTR32;
     
    863865
    864866/** Unsigned integer register in the guest context. */
     867typedef uint32_t              RTGCUINTREG32;
     868/** Pointer to an unsigned integer register in the guest context. */
     869typedef RTGCUINTREG32        *PRTGCUINTREG32;
     870/** Pointer to a const unsigned integer register in the guest context. */
     871typedef const RTGCUINTREG32  *PCRTGCUINTREG32;
     872
     873typedef uint64_t              RTGCUINTREG64;
     874/** Pointer to an unsigned integer register in the guest context. */
     875typedef RTGCUINTREG64        *PRTGCUINTREG64;
     876/** Pointer to a const unsigned integer register in the guest context. */
     877typedef const RTGCUINTREG64  *PCRTGCUINTREG64;
     878
    865879#if GC_ARCH_BITS == 64
    866 typedef uint64_t            RTGCUINTREG;
     880typedef RTGCUINTREG64       RTGCUINTREG;
    867881#elif GC_ARCH_BITS == 32
    868 typedef uint32_t            RTGCUINTREG;
     882typedef RTGCUINTREG32       RTGCUINTREG;
    869883#else
    870884# error "Unsupported GC_ARCH_BITS!"
     
    904918#endif
    905919
     920/** Unsigned integer register in the current 32 bits context. */
     921typedef uint32_t              RTCCUINTREG32;
     922/** Pointer to an unsigned integer register in the current context. */
     923typedef RTCCUINTREG32        *PRTCCUINTREG32;
     924/** Pointer to a const unsigned integer register in the current context. */
     925typedef const RTCCUINTREG32  *PCRTCCUINTREG32;
     926
     927/** Unsigned integer register in the current 64 bits context. */
     928typedef uint64_t              RTCCUINTREG64;
     929/** Pointer to an unsigned integer register in the current context. */
     930typedef RTCCUINTREG64        *PRTCCUINTREG64;
     931/** Pointer to a const unsigned integer register in the current context. */
     932typedef const RTCCUINTREG64  *PCRTCCUINTREG64;
     933
    906934/** Unsigned integer register in the current context. */
    907935#if ARCH_BITS == 32
    908 typedef uint32_t            RTCCUINTREG;
     936typedef RTCCUINTREG32         RTCCUINTREG;
     937/** Pointer to an unsigned integer register in the current context. */
     938typedef PRTCCUINTREG32        PRTCCUINTREG;
     939/** Pointer to a const unsigned integer register in the current context. */
     940typedef PCRTCCUINTREG32       PCRTCCUINTREG;
    909941#elif ARCH_BITS == 64
    910 typedef uint64_t            RTCCUINTREG;
     942typedef RTCCUINTREG64         RTCCUINTREG;
     943/** Pointer to an unsigned integer register in the current context. */
     944typedef PRTCCUINTREG64      PRTCCUINTREG;
     945/** Pointer to a const unsigned integer register in the current context. */
     946typedef PCRTCCUINTREG64     PCRTCCUINTREG;
    911947#else
    912948# error "Unsupported ARCH_BITS!"
    913949#endif
    914 /** Pointer to an unsigned integer register in the current context. */
    915 typedef RTCCUINTREG        *PRTCCUINTREG;
    916 /** Pointer to a const unsigned integer register in the current context. */
    917 typedef const RTCCUINTREG  *PCRTCCUINTREG;
    918 
    919 /** @deprecated */
    920 typedef RTCCUINTREG         RTUINTREG;
    921 /** @deprecated */
    922 typedef RTCCUINTREG        *PRTUINTREG;
    923 /** @deprecated */
    924 typedef const RTCCUINTREG  *PCRTUINTREG;
    925950
    926951/** @} */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette