VirtualBox

vbox的更動 37675 路徑 trunk/src/recompiler/cpu-all.h


忽略:
時間撮記:
2011-6-29 上午07:07:14 (13 年 以前)
作者:
vboxsync
訊息:

rem: Synced with v0.12.5.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/recompiler/cpu-all.h

    r36175 r37675  
    4545 * memory accesses.
    4646 *
    47  * WORDS_BIGENDIAN : if defined, the host cpu is big endian and
     47 * HOST_WORDS_BIGENDIAN : if defined, the host cpu is big endian and
    4848 * otherwise little endian.
    4949 *
     
    5555#include "softfloat.h"
    5656
    57 #if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
     57#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
    5858#define BSWAP_NEEDED
    5959#endif
     
    141141typedef union {
    142142    float64 d;
    143 #if defined(WORDS_BIGENDIAN) \
     143#if defined(HOST_WORDS_BIGENDIAN) \
    144144    || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
    145145    struct {
     
    159159typedef union {
    160160    float128 q;
    161 #if defined(WORDS_BIGENDIAN) \
     161#if defined(HOST_WORDS_BIGENDIAN) \
    162162    || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
    163163    struct {
     
    240240void        remR3PhysWriteU64(RTGCPHYS DstGCPhys, uint64_t val);
    241241
    242 #ifndef REM_PHYS_ADDR_IN_TLB
     242# ifndef REM_PHYS_ADDR_IN_TLB
    243243void       *remR3TlbGCPhys2Ptr(CPUState *env1, target_ulong physAddr, int fWritable);
    244 #endif
     244# endif
    245245
    246246#endif /* VBOX */
     
    308308}
    309309
    310 #undef VBOX_CHECK_ADDR
     310# undef VBOX_CHECK_ADDR
    311311
    312312/* float access */
     
    368368   kernel handles unaligned load/stores may give better results, but
    369369   it is a system wide setting : bad */
    370 #if defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
     370#if defined(HOST_WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
    371371
    372372/* conservative code for little endian unaligned accesses */
     
    546546#endif /* !VBOX */
    547547
    548 #if !defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
     548#if !defined(HOST_WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
    549549
    550550static inline int lduw_be_p(const void *ptr)
     
    772772 * This allows the guest address space to be offset to a convenient location.
    773773 */
    774 //#define GUEST_BASE 0x20000000
    775 #define GUEST_BASE 0
     774#if defined(CONFIG_USE_GUEST_BASE)
     775extern unsigned long guest_base;
     776extern int have_guest_base;
     777#define GUEST_BASE guest_base
     778#else
     779#define GUEST_BASE 0ul
     780#endif
    776781
    777782/* All direct uses of g2h and h2g need to go away for usermode softmmu.  */
     
    10421047#define VGA_DIRTY_FLAG       0x01
    10431048#define CODE_DIRTY_FLAG      0x02
    1044 #define KQEMU_DIRTY_FLAG     0x04
    10451049#define MIGRATION_DIRTY_FLAG 0x08
    10461050
     
    12111215}
    12121216
    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}
    12141233
    12151234static inline int64_t cpu_get_real_ticks(void)
    12161235{
    1217 #if __mips_isa_rev >= 2
     1236/* On kernels >= 2.6.25 rdhwr <reg>, $2 and $3 are emulated */
    12181237    uint32_t count;
    12191238    static uint32_t cyc_per_count = 0;
    12201239
    12211240    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);
    12251244    return (int64_t)(count * cyc_per_count);
    1226 #else
    1227     /* FIXME */
    1228     static int64_t ticks = 0;
    1229     return ticks++;
    1230 #endif
    12311245}
    12321246
     
    12491263}
    12501264
    1251 extern int64_t kqemu_time, kqemu_time_start;
    12521265extern int64_t qemu_time, qemu_time_start;
    12531266extern int64_t tlb_flush_time;
    1254 extern int64_t kqemu_exec_count;
    12551267extern 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;
    12591268#endif
    12601269
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette