Changeset 6532 in vbox for trunk/src/recompiler/cpu-all.h
- Timestamp:
- Jan 28, 2008 6:10:09 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/cpu-all.h
r6211 r6532 1 1 /* 2 2 * defines common to all virtual CPUs 3 * 3 * 4 4 * Copyright (c) 2003 Fabrice Bellard 5 5 * … … 33 33 #endif 34 34 35 /* some important defines: 36 * 35 /* some important defines: 36 * 37 37 * WORDS_ALIGNED : if defined, the host cpu can only make word aligned 38 38 * memory accesses. 39 * 39 * 40 40 * WORDS_BIGENDIAN : if defined, the host cpu is big endian and 41 41 * otherwise little endian. 42 * 42 * 43 43 * (TARGET_WORDS_ALIGNED : same for target cpu (not supported yet)) 44 * 44 * 45 45 * TARGET_WORDS_BIGENDIAN : same for target cpu 46 46 */ … … 156 156 * (empty): integer access 157 157 * f : float access 158 * 158 * 159 159 * sign is: 160 160 * (empty): for floats or 32 bit size … … 167 167 * l: 32 bits 168 168 * q: 64 bits 169 * 169 * 170 170 * endian is: 171 171 * (empty): target cpu endianness or 8 bit access … … 196 196 void remR3PhysWriteU64(RTGCPHYS DstGCPhys, uint64_t val); 197 197 198 #ifdef PGM_DYNAMIC_RAM_ALLOC199 198 void remR3GrowDynRange(unsigned long physaddr); 200 #endif201 199 #if 0 /*defined(RT_ARCH_AMD64) && defined(VBOX_STRICT)*/ 202 200 # define VBOX_CHECK_ADDR(ptr) do { if ((uintptr_t)(ptr) >= _4G) __asm__("int3"); } while (0) 203 201 #else 204 202 # define VBOX_CHECK_ADDR(ptr) do { } while (0) 205 #endif 203 #endif 206 204 207 205 static inline int ldub_p(void *ptr) … … 759 757 760 758 761 #if defined(CONFIG_USER_ONLY) 759 #if defined(CONFIG_USER_ONLY) 762 760 763 761 /* if user mode, no other memory access functions */ … … 821 819 /* original state of the write flag (used when tracking self-modifying 822 820 code */ 823 #define PAGE_WRITE_ORG 0x0010 821 #define PAGE_WRITE_ORG 0x0010 824 822 825 823 void page_dump(FILE *f); … … 892 890 #endif /* SINGLE_CPU_DEFINES */ 893 891 894 void cpu_dump_state(CPUState *env, FILE *f, 892 void cpu_dump_state(CPUState *env, FILE *f, 895 893 int (*cpu_fprintf)(FILE *f, const char *fmt, ...), 896 894 int flags); … … 938 936 target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr); 939 937 940 #define CPU_LOG_TB_OUT_ASM (1 << 0) 938 #define CPU_LOG_TB_OUT_ASM (1 << 0) 941 939 #define CPU_LOG_TB_IN_ASM (1 << 1) 942 940 #define CPU_LOG_TB_OP (1 << 2) … … 985 983 extern uint32_t phys_ram_dirty_size; 986 984 #endif /* VBOX */ 987 #if !defined(VBOX) || !(defined(PGM_DYNAMIC_RAM_ALLOC) || defined(REM_PHYS_ADDR_IN_TLB))985 #if !defined(VBOX) 988 986 extern uint8_t *phys_ram_base; 989 987 #endif … … 999 997 #define IO_MEM_UNASSIGNED (2 << IO_MEM_SHIFT) 1000 998 #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) 1002 1000 #define IO_MEM_RAM_MISSING (5 << IO_MEM_SHIFT) /* used internally, never use directly */ 1003 1001 #endif … … 1010 1008 typedef uint32_t CPUReadMemoryFunc(void *opaque, target_phys_addr_t addr); 1011 1009 1012 void cpu_register_physical_memory(target_phys_addr_t start_addr, 1010 void cpu_register_physical_memory(target_phys_addr_t start_addr, 1013 1011 unsigned long size, 1014 1012 unsigned long phys_offset); … … 1023 1021 void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, 1024 1022 int len, int is_write); 1025 static inline void cpu_physical_memory_read(target_phys_addr_t addr, 1023 static inline void cpu_physical_memory_read(target_phys_addr_t addr, 1026 1024 uint8_t *buf, int len) 1027 1025 { 1028 1026 cpu_physical_memory_rw(addr, buf, len, 0); 1029 1027 } 1030 static inline void cpu_physical_memory_write(target_phys_addr_t addr, 1028 static inline void cpu_physical_memory_write(target_phys_addr_t addr, 1031 1029 const uint8_t *buf, int len) 1032 1030 { … … 1043 1041 void stq_phys(target_phys_addr_t addr, uint64_t val); 1044 1042 1045 void cpu_physical_memory_write_rom(target_phys_addr_t addr, 1043 void cpu_physical_memory_write_rom(target_phys_addr_t addr, 1046 1044 const uint8_t *buf, int len); 1047 int cpu_memory_rw_debug(CPUState *env, target_ulong addr, 1045 int cpu_memory_rw_debug(CPUState *env, target_ulong addr, 1048 1046 uint8_t *buf, int len, int is_write); 1049 1047 … … 1065 1063 } 1066 1064 1067 static inline int cpu_physical_memory_get_dirty(ram_addr_t addr, 1065 static inline int cpu_physical_memory_get_dirty(ram_addr_t addr, 1068 1066 int dirty_flags) 1069 1067 { … … 1082 1080 { 1083 1081 #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)) 1085 1083 { 1086 1084 Log(("cpu_physical_memory_is_dirty: %VGp\n", (RTGCPHYS)addr)); … … 1104 1102 #if defined(__powerpc__) 1105 1103 1106 static inline uint32_t get_tbl(void) 1104 static inline uint32_t get_tbl(void) 1107 1105 { 1108 1106 uint32_t tbl; … … 1111 1109 } 1112 1110 1113 static inline uint32_t get_tbu(void) 1111 static inline uint32_t get_tbu(void) 1114 1112 { 1115 1113 uint32_t tbl;
Note:
See TracChangeset
for help on using the changeset viewer.