VirtualBox

Changeset 6532 in vbox for trunk/src/recompiler/cpu-all.h


Ignore:
Timestamp:
Jan 28, 2008 6:10:09 PM (17 years ago)
Author:
vboxsync
Message:

Cleaned out the PGM_DYNAMIC_RAM_ALLOC tests to avoid unnecessary mess with VBOX_WITH_NEW_PHYS_CODE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/cpu-all.h

    r6211 r6532  
    11/*
    22 * defines common to all virtual CPUs
    3  * 
     3 *
    44 *  Copyright (c) 2003 Fabrice Bellard
    55 *
     
    3333#endif
    3434
    35 /* some important defines: 
    36  * 
     35/* some important defines:
     36 *
    3737 * WORDS_ALIGNED : if defined, the host cpu can only make word aligned
    3838 * memory accesses.
    39  * 
     39 *
    4040 * WORDS_BIGENDIAN : if defined, the host cpu is big endian and
    4141 * otherwise little endian.
    42  * 
     42 *
    4343 * (TARGET_WORDS_ALIGNED : same for target cpu (not supported yet))
    44  * 
     44 *
    4545 * TARGET_WORDS_BIGENDIAN : same for target cpu
    4646 */
     
    156156 * (empty): integer access
    157157 *   f    : float access
    158  * 
     158 *
    159159 * sign is:
    160160 * (empty): for floats or 32 bit size
     
    167167 *   l: 32 bits
    168168 *   q: 64 bits
    169  * 
     169 *
    170170 * endian is:
    171171 * (empty): target cpu endianness or 8 bit access
     
    196196void     remR3PhysWriteU64(RTGCPHYS DstGCPhys, uint64_t val);
    197197
    198 #ifdef PGM_DYNAMIC_RAM_ALLOC
    199198void     remR3GrowDynRange(unsigned long physaddr);
    200 #endif
    201199#if 0 /*defined(RT_ARCH_AMD64) && defined(VBOX_STRICT)*/
    202200# define VBOX_CHECK_ADDR(ptr) do { if ((uintptr_t)(ptr) >= _4G) __asm__("int3"); } while (0)
    203201#else
    204202# define VBOX_CHECK_ADDR(ptr) do { } while (0)
    205 #endif 
     203#endif
    206204
    207205static inline int ldub_p(void *ptr)
     
    759757
    760758
    761 #if defined(CONFIG_USER_ONLY) 
     759#if defined(CONFIG_USER_ONLY)
    762760
    763761/* if user mode, no other memory access functions */
     
    821819/* original state of the write flag (used when tracking self-modifying
    822820   code */
    823 #define PAGE_WRITE_ORG 0x0010 
     821#define PAGE_WRITE_ORG 0x0010
    824822
    825823void page_dump(FILE *f);
     
    892890#endif /* SINGLE_CPU_DEFINES */
    893891
    894 void cpu_dump_state(CPUState *env, FILE *f, 
     892void cpu_dump_state(CPUState *env, FILE *f,
    895893                    int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
    896894                    int flags);
     
    938936target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr);
    939937
    940 #define CPU_LOG_TB_OUT_ASM (1 << 0) 
     938#define CPU_LOG_TB_OUT_ASM (1 << 0)
    941939#define CPU_LOG_TB_IN_ASM  (1 << 1)
    942940#define CPU_LOG_TB_OP      (1 << 2)
     
    985983extern uint32_t phys_ram_dirty_size;
    986984#endif /* VBOX */
    987 #if !defined(VBOX) || !(defined(PGM_DYNAMIC_RAM_ALLOC) || defined(REM_PHYS_ADDR_IN_TLB))
     985#if !defined(VBOX)
    988986extern uint8_t *phys_ram_base;
    989987#endif
     
    999997#define IO_MEM_UNASSIGNED  (2 << IO_MEM_SHIFT)
    1000998#define IO_MEM_NOTDIRTY    (4 << IO_MEM_SHIFT) /* used internally, never use directly */
    1001 #if defined(VBOX) && defined(PGM_DYNAMIC_RAM_ALLOC)
     999#if defined(VBOX)
    10021000#define IO_MEM_RAM_MISSING (5 << IO_MEM_SHIFT) /* used internally, never use directly */
    10031001#endif
     
    10101008typedef uint32_t CPUReadMemoryFunc(void *opaque, target_phys_addr_t addr);
    10111009
    1012 void cpu_register_physical_memory(target_phys_addr_t start_addr, 
     1010void cpu_register_physical_memory(target_phys_addr_t start_addr,
    10131011                                  unsigned long size,
    10141012                                  unsigned long phys_offset);
     
    10231021void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
    10241022                            int len, int is_write);
    1025 static inline void cpu_physical_memory_read(target_phys_addr_t addr, 
     1023static inline void cpu_physical_memory_read(target_phys_addr_t addr,
    10261024                                            uint8_t *buf, int len)
    10271025{
    10281026    cpu_physical_memory_rw(addr, buf, len, 0);
    10291027}
    1030 static inline void cpu_physical_memory_write(target_phys_addr_t addr, 
     1028static inline void cpu_physical_memory_write(target_phys_addr_t addr,
    10311029                                             const uint8_t *buf, int len)
    10321030{
     
    10431041void stq_phys(target_phys_addr_t addr, uint64_t val);
    10441042
    1045 void cpu_physical_memory_write_rom(target_phys_addr_t addr, 
     1043void cpu_physical_memory_write_rom(target_phys_addr_t addr,
    10461044                                   const uint8_t *buf, int len);
    1047 int cpu_memory_rw_debug(CPUState *env, target_ulong addr, 
     1045int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
    10481046                        uint8_t *buf, int len, int is_write);
    10491047
     
    10651063}
    10661064
    1067 static inline int cpu_physical_memory_get_dirty(ram_addr_t addr, 
     1065static inline int cpu_physical_memory_get_dirty(ram_addr_t addr,
    10681066                                                int dirty_flags)
    10691067{
     
    10821080{
    10831081#ifdef VBOX
    1084     if (RT_UNLIKELY((addr >> TARGET_PAGE_BITS) >= phys_ram_dirty_size)) 
     1082    if (RT_UNLIKELY((addr >> TARGET_PAGE_BITS) >= phys_ram_dirty_size))
    10851083    {
    10861084        Log(("cpu_physical_memory_is_dirty: %VGp\n", (RTGCPHYS)addr));
     
    11041102#if defined(__powerpc__)
    11051103
    1106 static inline uint32_t get_tbl(void) 
     1104static inline uint32_t get_tbl(void)
    11071105{
    11081106    uint32_t tbl;
     
    11111109}
    11121110
    1113 static inline uint32_t get_tbu(void) 
     1111static inline uint32_t get_tbu(void)
    11141112{
    11151113        uint32_t tbl;
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