vbox的更動 37675 路徑 trunk/src/recompiler/cpu-all.h
- 時間撮記:
- 2011-6-29 上午07:07:14 (13 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/recompiler/cpu-all.h
r36175 r37675 45 45 * memory accesses. 46 46 * 47 * WORDS_BIGENDIAN : if defined, the host cpu is big endian and47 * HOST_WORDS_BIGENDIAN : if defined, the host cpu is big endian and 48 48 * otherwise little endian. 49 49 * … … 55 55 #include "softfloat.h" 56 56 57 #if defined( WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)57 #if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN) 58 58 #define BSWAP_NEEDED 59 59 #endif … … 141 141 typedef union { 142 142 float64 d; 143 #if defined( WORDS_BIGENDIAN) \143 #if defined(HOST_WORDS_BIGENDIAN) \ 144 144 || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT)) 145 145 struct { … … 159 159 typedef union { 160 160 float128 q; 161 #if defined( WORDS_BIGENDIAN) \161 #if defined(HOST_WORDS_BIGENDIAN) \ 162 162 || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT)) 163 163 struct { … … 240 240 void remR3PhysWriteU64(RTGCPHYS DstGCPhys, uint64_t val); 241 241 242 # ifndef REM_PHYS_ADDR_IN_TLB242 # ifndef REM_PHYS_ADDR_IN_TLB 243 243 void *remR3TlbGCPhys2Ptr(CPUState *env1, target_ulong physAddr, int fWritable); 244 # endif244 # endif 245 245 246 246 #endif /* VBOX */ … … 308 308 } 309 309 310 # undef VBOX_CHECK_ADDR310 # undef VBOX_CHECK_ADDR 311 311 312 312 /* float access */ … … 368 368 kernel handles unaligned load/stores may give better results, but 369 369 it is a system wide setting : bad */ 370 #if defined( WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)370 #if defined(HOST_WORDS_BIGENDIAN) || defined(WORDS_ALIGNED) 371 371 372 372 /* conservative code for little endian unaligned accesses */ … … 546 546 #endif /* !VBOX */ 547 547 548 #if !defined( WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)548 #if !defined(HOST_WORDS_BIGENDIAN) || defined(WORDS_ALIGNED) 549 549 550 550 static inline int lduw_be_p(const void *ptr) … … 772 772 * This allows the guest address space to be offset to a convenient location. 773 773 */ 774 //#define GUEST_BASE 0x20000000 775 #define GUEST_BASE 0 774 #if defined(CONFIG_USE_GUEST_BASE) 775 extern unsigned long guest_base; 776 extern int have_guest_base; 777 #define GUEST_BASE guest_base 778 #else 779 #define GUEST_BASE 0ul 780 #endif 776 781 777 782 /* All direct uses of g2h and h2g need to go away for usermode softmmu. */ … … 1042 1047 #define VGA_DIRTY_FLAG 0x01 1043 1048 #define CODE_DIRTY_FLAG 0x02 1044 #define KQEMU_DIRTY_FLAG 0x041045 1049 #define MIGRATION_DIRTY_FLAG 0x08 1046 1050 … … 1211 1215 } 1212 1216 1213 #elif defined(__mips__) 1217 #elif defined(__mips__) && \ 1218 ((defined(__mips_isa_rev) && __mips_isa_rev >= 2) || defined(__linux__)) 1219 /* 1220 * binutils wants to use rdhwr only on mips32r2 1221 * but as linux kernel emulate it, it's fine 1222 * to use it. 1223 * 1224 */ 1225 #define MIPS_RDHWR(rd, value) { \ 1226 __asm__ __volatile__ ( \ 1227 ".set push\n\t" \ 1228 ".set mips32r2\n\t" \ 1229 "rdhwr %0, "rd"\n\t" \ 1230 ".set pop" \ 1231 : "=r" (value)); \ 1232 } 1214 1233 1215 1234 static inline int64_t cpu_get_real_ticks(void) 1216 1235 { 1217 #if __mips_isa_rev >= 2 1236 /* On kernels >= 2.6.25 rdhwr <reg>, $2 and $3 are emulated */ 1218 1237 uint32_t count; 1219 1238 static uint32_t cyc_per_count = 0; 1220 1239 1221 1240 if (!cyc_per_count) 1222 __asm__ __volatile__("rdhwr %0, $3" : "=r" (cyc_per_count));1223 1224 __asm__ __volatile__("rdhwr %1, $2" : "=r" (count));1241 MIPS_RDHWR("$3", cyc_per_count); 1242 1243 MIPS_RDHWR("$2", count); 1225 1244 return (int64_t)(count * cyc_per_count); 1226 #else1227 /* FIXME */1228 static int64_t ticks = 0;1229 return ticks++;1230 #endif1231 1245 } 1232 1246 … … 1249 1263 } 1250 1264 1251 extern int64_t kqemu_time, kqemu_time_start;1252 1265 extern int64_t qemu_time, qemu_time_start; 1253 1266 extern int64_t tlb_flush_time; 1254 extern int64_t kqemu_exec_count;1255 1267 extern int64_t dev_time; 1256 extern int64_t kqemu_ret_int_count;1257 extern int64_t kqemu_ret_excp_count;1258 extern int64_t kqemu_ret_intr_count;1259 1268 #endif 1260 1269
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器