VirtualBox

vbox的更動 37675 路徑 trunk/src/recompiler/tcg/tcg.c


忽略:
時間撮記:
2011-6-29 上午07:07:14 (14 年 以前)
作者:
vboxsync
svn:sync-xref-src-repo-rev:
72535
訊息:

rem: Synced with v0.12.5.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/recompiler/tcg/tcg.c

    r36175 r37675  
    2828#include "config.h"
    2929
    30 #ifndef DEBUG_TCG
     30#ifndef CONFIG_DEBUG_TCG
    3131/* define it to suppress various consistency checks (faster) */
    3232#define NDEBUG
     
    5252#include "qemu-common.h"
    5353#include "cache-utils.h"
     54#include "host-utils.h"
    5455
    5556/* Note: the long term plan is to reduce the dependancies on the QEMU
     
    6364#include "elf.h"
    6465
     66#if defined(CONFIG_USE_GUEST_BASE) && !defined(TCG_TARGET_HAS_GUEST_BASE)
     67#error GUEST_BASE not supported on this host.
     68#endif
    6569
    6670#ifdef VBOX
     
    7478#  undef USE_LIVENESS_ANALYSIS
    7579# endif
     80///* With 0.12.5 the liveness analysis does not work well even when targeting
     81//   32-bit guest cpus.  Just disable it wholesale to be on the safe side.  */
     82//#undef USE_LIVENESS_ANALYSIS
    7683#endif /* VBOX */
    7784
     
    8289#define DEF(s, n, copy_size) { #s, 0, 0, n, n, 0, copy_size },
    8390#ifndef VBOX
    84 #define DEF2(s, iargs, oargs, cargs, flags) { #s, iargs, oargs, cargs, iargs + oargs + cargs, flags, 0 },
     91#define DEF2(s, oargs, iargs, cargs, flags) { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags, 0 },
    8592#else  /* VBOX */
    86 # define DEF2(s, iargs, oargs, cargs, flags) { #s, iargs, oargs, cargs, iargs + oargs + cargs, flags, 0, 0, 0 },
     93# define DEF2(s, oargs, iargs, cargs, flags) { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags, 0, 0, 0 },
    8794#endif /* VBOX */
    8895#include "tcg-opc.h"
     
    11171124    nb_ops = gen_opc_ptr - gen_opc_buf;
    11181125
    1119     /* XXX: make it really dynamic */
    1120     s->op_dead_iargs = tcg_malloc(OPC_BUF_SIZE * sizeof(uint16_t));
     1126    s->op_dead_iargs = tcg_malloc(nb_ops * sizeof(uint16_t));
    11211127
    11221128    dead_temps = tcg_malloc(s->nb_temps);
     
    19011907static int64_t tcg_table_op_count[NB_OPS];
    19021908
    1903 void dump_op_count(void)
     1909static void dump_op_count(void)
    19041910{
    19051911    int i;
     
    19391945
    19401946#ifdef DEBUG_DISAS
     1947# ifdef USE_LIVENESS_ANALYSIS /* vbox */
    19411948    if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) {
    1942         qemu_log("OP after la:\n");
     1949        qemu_log("OP after liveness analysis:\n");
    19431950        tcg_dump_ops(s, logfile);
    19441951        qemu_log("\n");
    19451952    }
     1953# endif /* USE_LIVENESS_ANALYSIS - vbox */
    19461954#endif
    19471955
     
    19811989        case INDEX_op_debug_insn_start:
    19821990            /* debug instruction */
     1991//#ifdef VBOX /* HACK ALERT: GROSS HACK to work around registister allocation bugs in v0.12.5 */
     1992//            save_globals(s, s->reserved_regs);
     1993//#endif
    19831994            break;
    19841995        case INDEX_op_nop:
     
    21092120    cpu_fprintf(f, "  avg cycles        %0.1f\n",
    21102121                s->restore_count ? (double)s->restore_time / s->restore_count : 0);
    2111     {
    2112         extern void dump_op_count(void);
    2113         dump_op_count();
    2114     }
     2122
     2123    dump_op_count();
    21152124}
    21162125#else
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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