VirtualBox

Changeset 9212 in vbox for trunk/src/VBox/Runtime


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.

Location:
trunk/src/VBox/Runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/sanity.h

    r8245 r9212  
    4646# error "defined(IN_RING0) && ARCH_BITS != R0_ARCH_BITS"
    4747#endif
    48 #if defined(IN_GC) && ARCH_BITS != GC_ARCH_BITS
    49 # error "defined(IN_GC) && ARCH_BITS != GC_ARCH_BITS"
     48#if defined(IN_GC) && ARCH_BITS != 32
     49# error "defined(IN_GC) && ARCH_BITS != 32"
    5050#endif
    5151#if (defined(IN_RING0) || defined(IN_RING3)) && HC_ARCH_BITS != ARCH_BITS
    5252# error "(defined(IN_RING0) || defined(IN_RING3)) && HC_ARCH_BITS != ARCH_BITS"
    5353#endif
    54 #if defined(IN_GC) && GC_ARCH_BITS != ARCH_BITS
     54#if defined(IN_GC) && GC_ARCH_BITS != 64 && GC_ARCH_BITS != ARCH_BITS
    5555# error "defined(IN_GC) && GC_ARCH_BITS != ARCH_BITS"
    5656#endif
     
    124124#if GC_ARCH_BITS == 64
    125125
    126 AssertCompileSize(RTGCINT, 4);
    127 AssertCompileSize(RTGCUINT, 4);
     126AssertCompileSize(RTGCINT, 8);
     127AssertCompileSize(RTGCUINT, 8);
    128128AssertCompileSize(RTGCINTPTR, 8);
    129129AssertCompileSize(RTGCUINTPTR, 8);
     
    133133# ifdef IN_GC
    134134/*AssertCompileSize(RTCCINTREG, 8);*/
    135 AssertCompileSize(RTCCUINTREG, 8);
     135/* Hack alert: there is no such thing as a GC context when GC_ARCH_BITS == 64; it's still 32 bits */
     136AssertCompileSize(RTCCUINTREG, 4);
    136137# endif
    137138
  • trunk/src/VBox/Runtime/common/string/strformatrt.cpp

    r8479 r9212  
    5454 *      - \%RTproc          - Takes a #RTPROCESS value.
    5555 *      - \%RTptr           - Takes a #RTINTPTR or #RTUINTPTR value (but not void *).
    56  *      - \%RTreg           - Takes a #RTUINTREG value.
     56 *      - \%RTreg           - Takes a #RTCCUINTREG value.
    5757 *      - \%RTsel           - Takes a #RTSEL value.
    5858 *      - \%RTsem           - Takes a #RTSEMEVENT, #RTSEMEVENTMULTI, #RTSEMMUTEX, #RTSEMFASTMUTEX, or #RTSEMRW value.
     
    245245                    { STRMEM("Tproc"),   sizeof(RTPROCESS),      16, RTSF_INTW,  0 },
    246246                    { STRMEM("Tptr"),    sizeof(RTUINTPTR),      16, RTSF_INTW,  0 },
    247                     { STRMEM("Treg"),    sizeof(RTUINTREG),      16, RTSF_INTW,  0 },
     247                    { STRMEM("Treg"),    sizeof(RTCCUINTREG),    16, RTSF_INTW,  0 },
    248248                    { STRMEM("Tsel"),    sizeof(RTSEL),          16, RTSF_INTW,  0 },
    249249                    { STRMEM("Tsem"),    sizeof(RTSEMEVENT),     16, RTSF_INTW,  0 },
  • trunk/src/VBox/Runtime/testcase/tstStrFormat.cpp

    r8245 r9212  
    294294    }
    295295
    296     if (sizeof(RTUINTREG) == 8)
    297     {
    298         CHECK42("%RTreg", (RTUINTREG)0, "0000000000000000");
    299         CHECK42("%RTreg", ~(RTUINTREG)0, "ffffffffffffffff");
    300         CHECK42("%RTreg", (RTUINTREG)0x84342134, "0000000084342134");
    301         CHECK42("%RTreg", (RTUINTREG)0x23484342134ULL, "0000023484342134");
     296    if (sizeof(RTCCUINTREG) == 8)
     297    {
     298        CHECK42("%RTreg", (RTCCUINTREG)0, "0000000000000000");
     299        CHECK42("%RTreg", ~(RTCCUINTREG)0, "ffffffffffffffff");
     300        CHECK42("%RTreg", (RTCCUINTREG)0x84342134, "0000000084342134");
     301        CHECK42("%RTreg", (RTCCUINTREG)0x23484342134ULL, "0000023484342134");
    302302    }
    303303    else
    304304    {
    305         CHECK42("%RTreg", (RTUINTREG)0, "00000000");
    306         CHECK42("%RTreg", ~(RTUINTREG)0, "ffffffff");
    307         CHECK42("%RTreg", (RTUINTREG)0x84342134, "84342134");
     305        CHECK42("%RTreg", (RTCCUINTREG)0, "00000000");
     306        CHECK42("%RTreg", ~(RTCCUINTREG)0, "ffffffff");
     307        CHECK42("%RTreg", (RTCCUINTREG)0x84342134, "84342134");
    308308    }
    309309
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