VirtualBox

Changeset 3726 in vbox for trunk/src


Ignore:
Timestamp:
Jul 19, 2007 7:07:48 PM (18 years ago)
Author:
vboxsync
Message:

Double underscore cleanup.

Location:
trunk/src/recompiler
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/InnoTek/config-host.h

    r2981 r3726  
    2121
    2222
    23 #if defined(__amd64__) || defined(HOST_X86_64) /* latter, for dyngen on win64. */
     23#if defined(RT_ARCH_AMD64) || defined(HOST_X86_64) /* The latter, for dyngen when cross compiling (windows, l4, etc). */
    2424# define HOST_X86_64 1
    2525# define HOST_LONG_BITS 64
     
    2727# define HOST_I386 1
    2828# define HOST_LONG_BITS 32
    29 # ifdef __WIN32__
     29# ifdef RT_OS_WINDOWS
    3030#  define CONFIG_WIN32 1
    31 # elif defined(__OS2__)
     31# elif defined(RT_OS_OS2)
    3232#  define CONFIG_OS2
    33 # elif defined(__DARWIN__)
     33# elif defined(RT_OS_DARWIN)
    3434#  define CONFIG_DARWIN
    35 # elif defined(__FREEBSD__) || defined(__NETBSD__) || defined(__OPENBSD__)
     35# elif defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) || defined(RT_OS_OPENBSD)
    3636/*#  define CONFIG_BSD*/
    37 # elif defined(__SOLARIS__)
     37# elif defined(RT_OS_SOLARIS)
    3838/*#  define CONFIG_SUN*/
    3939# elif !defined(IPRT_NO_CRT)
  • trunk/src/recompiler/VBoxREMWrapper.cpp

    r3615 r3726  
    158158 * use calling convention wrappers.
    159159 */
    160 #if (defined(__AMD64__) && defined(__WIN__)) || defined(__DOXYGEN__)
     160#if (defined(RT_ARCH_AMD64) && defined(RT_OS_WINDOWS)) || defined(__DOXYGEN__)
    161161# define USE_REM_CALLING_CONVENTION_GLUE
    162162#endif
     
    166166 * emit some jump glue to deal with big addresses.
    167167 */
    168 #if (defined(__AMD64__) && !defined(USE_REM_CALLING_CONVENTION_GLUE) && !defined(__DARWIN__)) || defined(__DOXYGEN__)
     168#if (defined(RT_ARCH_AMD64) && !defined(USE_REM_CALLING_CONVENTION_GLUE) && !defined(__DARWIN__)) || defined(__DOXYGEN__)
    169169# define USE_REM_IMPORT_JUMP_GLUE
    170170#endif
     
    217217     * For REMPARMDESC_FLAGS_PFN this is a PREMFNDESC. */
    218218    void       *pvExtra;
    219    
     219
    220220} REMPARMDESC, *PREMPARMDESC;
    221221/** Pointer to a constant parameter descriptor. */
     
    486486    { REMPARMDESC_FLAGS_INT,        sizeof(CSAMTAG), NULL }
    487487};
    488 #if !(defined(__WIN__) && defined(__AMD64__)) /* the callbacks are problematic */
     488#if !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64)) /* the callbacks are problematic */
    489489static const REMPARMDESC g_aArgsDBGCRegisterCommands[] =
    490490{
     
    772772    { REMPARMDESC_FLAGS_INT,        sizeof(PSSMHANDLE), NULL },
    773773};
    774 static REMFNDESC g_SSMIntCallback = 
    775 {   
    776     "SSMIntCallback", NULL, &g_aArgsSSMIntCallback[0], ELEMENTS(g_aArgsSSMIntCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int),  NULL 
     774static REMFNDESC g_SSMIntCallback =
     775{
     776    "SSMIntCallback", NULL, &g_aArgsSSMIntCallback[0], ELEMENTS(g_aArgsSSMIntCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int),  NULL
    777777};
    778778
     
    783783    { REMPARMDESC_FLAGS_INT,        sizeof(uint32_t),           NULL },
    784784};
    785 static REMFNDESC g_SSMIntLoadExecCallback = 
    786 {   
    787     "SSMIntLoadExecCallback", NULL, &g_aArgsSSMIntLoadExecCallback[0], ELEMENTS(g_aArgsSSMIntLoadExecCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int),  NULL 
     785static REMFNDESC g_SSMIntLoadExecCallback =
     786{
     787    "SSMIntLoadExecCallback", NULL, &g_aArgsSSMIntLoadExecCallback[0], ELEMENTS(g_aArgsSSMIntLoadExecCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int),  NULL
    788788};
    789789static const REMPARMDESC g_aArgsSSMR3RegisterInternal[] =
     
    987987    { "CPUMQueryGuestCtxPtr",                   (void *)(uintptr_t)&CPUMQueryGuestCtxPtr,           &g_aArgsCPUMQueryGuestCtxPtr[0],            ELEMENTS(g_aArgsCPUMQueryGuestCtxPtr),              REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
    988988    { "CSAMR3MonitorPage",                      (void *)(uintptr_t)&CSAMR3MonitorPage,              &g_aArgsCSAMR3MonitorPage[0],               ELEMENTS(g_aArgsCSAMR3MonitorPage),                 REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
    989 #if !(defined(__WIN__) && defined(__AMD64__)) /* the callbacks are problematic */
     989#if !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64)) /* the callbacks are problematic */
    990990    { "DBGCRegisterCommands",                   (void *)(uintptr_t)&DBGCRegisterCommands,           &g_aArgsDBGCRegisterCommands[0],            ELEMENTS(g_aArgsDBGCRegisterCommands),              REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
    991991#endif
     
    12701270/**
    12711271 * Entry logger function.
    1272  * 
     1272 *
    12731273 * @param   pDesc       The description.
    12741274 */
     
    12811281/**
    12821282 * Exit logger function.
    1283  * 
     1283 *
    12841284 * @param   pDesc       The description.
    12851285 * @param   pvRet       The return code.
     
    12931293/**
    12941294 * Creates a wrapper for the specified callback function at run time.
    1295  * 
     1295 *
    12961296 * @param   pDesc       The function descriptor.
    12971297 * @param   pValue      Upon entry *pValue contains the address of the function to be wrapped.
     
    13051305    AssertPtr(pValue);
    13061306
    1307     /* 
     1307    /*
    13081308     * Simple?
    13091309     */
     
    13111311        return;
    13121312
    1313     /* 
     1313    /*
    13141314     * Locate the right function descriptor.
    13151315     */
     
    13281328     * Create a new glue patch.
    13291329     */
    1330 #ifdef __WIN__
     1330#ifdef RT_OS_WINDOWS
    13311331    int rc = remGenerateExportGlue(pValue, pDesc);
    13321332#else
    13331333#error "port me"
    1334 #endif 
     1334#endif
    13351335    AssertReleaseRC(rc);
    13361336
     
    16331633        }
    16341634        else
    1635         {   
     1635        {
    16361636            /* custom hacks - it's simpler to make assembly templates than writing a more generic code generator... */
    16371637            static const struct { const char *pszName; PFNRT pvStart, pvEnd; } s_aTemplates[] =
     
    16601660         */
    16611661        uint8_t *pb;
    1662 #   ifdef __AMD64__
     1662#   ifdef RT_ARCH_AMD64
    16631663        pDesc->pvWrapper = pb = (uint8_t *)remAllocGlue(32);
    16641664        AssertReturn(pDesc->pvWrapper, VERR_NO_MEMORY);
  • trunk/src/recompiler/VBoxREMWrapperA.asm

    r3615 r3726  
    3333
    3434
    35 %ifdef __AMD64__
     35%ifdef RT_ARCH_AMD64
    3636 ;;
    3737 ; 64-bit pushad
     
    8484    sub     rsp, 20h                    ; shadow space
    8585
    86    %ifdef __WIN__
     86   %ifdef RT_OS_WINDOWS
    8787    mov     rcx, REM_FIXUP_64_DESC
    8888   %else
     
    109109    sub     rsp, 20h                    ; shadow space
    110110
    111    %ifdef __WIN__
     111   %ifdef RT_OS_WINDOWS
    112112    mov     rdx, rax
    113113    mov     rcx, REM_FIXUP_64_DESC
     
    134134BEGINCODE
    135135
    136 %ifdef __WIN__
    137  %ifdef __AMD64__
     136%ifdef RT_OS_WINDOWS
     137 %ifdef RT_ARCH_AMD64
    138138
    139139
     
    568568    mov     [rsp], rdi                  ; -> rcx
    569569
    570     ; Now convert the function pointers. Have to setup a new shadow 
     570    ; Now convert the function pointers. Have to setup a new shadow
    571571    ; space here since the SSMR3RegisterInternal one is already in use.
    572572    sub     rsp, 20h
     
    878878ENDPROC WrapMSC2GCC9Int
    879879
    880  %endif ; __AMD64__
    881 %endif ; __WIN__
    882 
     880 %endif ; RT_ARCH_AMD64
     881%endif ; RT_OS_WINDOWS
     882
  • trunk/src/recompiler/VBoxRecompiler.c

    r3615 r3726  
    9191DECLINLINE(target_ulong) remR3HCVirt2GCPhysInlined(PVM pVM, void *addr);
    9292DECLINLINE(void *) remR3GCPhys2HCVirtInlined(PVM pVM, target_ulong addr);
    93 #endif 
     93#endif
    9494
    9595static uint32_t remR3MMIOReadU8(void *pvVM, target_phys_addr_t GCPhys);
     
    127127static STAMPROFILEADV gStatMemReadHCPtr;
    128128static STAMPROFILEADV gStatMemWriteHCPtr;
    129 #endif 
     129#endif
    130130#ifdef PGM_DYNAMIC_RAM_ALLOC
    131131static STAMPROFILE    gStatGCPhys2HCVirt;
    132132static STAMPROFILE    gStatHCVirt2GCPhys;
    133 #endif 
     133#endif
    134134static STAMCOUNTER    gStatCpuGetTSC;
    135135static STAMCOUNTER    gStatRefuseTFInhibit;
     
    188188
    189189
    190 #if defined(VBOX_WITH_DEBUGGER) && !(defined(__WIN__) && defined(__AMD64__))
     190#if defined(VBOX_WITH_DEBUGGER) && !(defined(RT_OS_WINDWS) && defined(RT_ARCH_AMD64))
    191191/*
    192192 * Debugger commands.
     
    235235/* Put them here to avoid unused variable warning. */
    236236AssertCompile(RT_SIZEOFMEMB(VM, rem.padding) >= RT_SIZEOFMEMB(VM, rem.s));
    237 #if !defined(IPRT_NO_CRT) && (defined(__LINUX__) || defined(__DARWIN__) || defined(__WIN__))
     237#if !defined(IPRT_NO_CRT) && (defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS))
    238238AssertCompileMemberSize(REM, Env, REM_ENV_SIZE);
    239239#else
     
    337337        return rc;
    338338
    339 #if defined(VBOX_WITH_DEBUGGER) && !(defined(__WIN__) && defined(__AMD64__))
     339#if defined(VBOX_WITH_DEBUGGER) && !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64))
    340340    /*
    341341     * Debugger commands.
     
    367367    STAM_REG(pVM, &gStatMemReadHCPtr,       STAMTYPE_PROFILE, "/PROF/REM/MemReadHCPtr", STAMUNIT_TICKS_PER_CALL, "Profiling memory access.");
    368368    STAM_REG(pVM, &gStatMemWriteHCPtr,      STAMTYPE_PROFILE, "/PROF/REM/MemWriteHCPtr", STAMUNIT_TICKS_PER_CALL, "Profiling memory access.");
    369 #endif 
     369#endif
    370370#ifdef PGM_DYNAMIC_RAM_ALLOC
    371371    STAM_REG(pVM, &gStatHCVirt2GCPhys,      STAMTYPE_PROFILE, "/PROF/REM/HCVirt2GCPhys", STAMUNIT_TICKS_PER_CALL, "Profiling memory convertion.");
     
    13861386    if(!is_user && !(env->state & CPU_RAW_RING0))
    13871387        return; /* We are currently not interested in kernel pages */
    1388 #endif 
     1388#endif
    13891389
    13901390#if !defined(PGM_DYNAMIC_RAM_ALLOC) && !defined(REM_PHYS_ADDR_IN_TLB)
     
    14321432# else
    14331433            phys_addr = virt_addr - (uintptr_t)phys_ram_base + addend;
    1434 # endif 
     1434# endif
    14351435        else
    14361436            phys_addr = addend;
     
    25772577# ifndef REM_PHYS_ADDR_IN_TLB
    25782578        uint32_t i;
    2579 # endif 
     2579# endif
    25802580
    25812581        cpu_register_physical_memory(GCPhys, cb, GCPhys | (fFlags & MM_RAM_FLAGS_RESERVED ? IO_MEM_UNASSIGNED : 0));
     
    26272627# ifndef REM_PHYS_ADDR_IN_TLB
    26282628    uint32_t idx;
    2629 #endif 
     2629#endif
    26302630
    26312631    Log(("REMR3NotifyPhysRamChunkRegister: GCPhys=%VGp cb=%d pvRam=%p fFlags=%d\n", GCPhys, cb, pvRam, fFlags));
     
    27402740    }
    27412741    pv = (void *)((uintptr_t)pv | (addr & PAGE_OFFSET_MASK));
    2742 #endif 
     2742#endif
    27432743    return pv;
    27442744}
     
    31683168#else
    31693169# define VBOX_CHECK_ADDR(GCPhys) do { } while (0)
    3170 #endif 
     3170#endif
    31713171
    31723172/**
     
    38573857
    38583858
    3859 #if defined(VBOX_WITH_DEBUGGER) && !(defined(__WIN__) && defined(__AMD64__))
     3859#if defined(VBOX_WITH_DEBUGGER) && !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64))
    38603860/**
    38613861 * External Debugger Command: .remstep [on|off|1|0]
     
    53915391
    53925392
    5393 #if defined(IPRT_NO_CRT) && defined(__WIN__) && defined(__X86__)
     5393#if defined(IPRT_NO_CRT) && defined(RT_OS_WINDOWS) && defined(RT_ARCH_X86)
    53945394/**
    53955395 * The Dll main entry point (stub).
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