Diff for /qemu/tci.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2018/04/24 19:16:33 version 1.1.1.2, 2018/04/24 19:33:28
Line 20 Line 20
 #include "config.h"  #include "config.h"
   
 /* Defining NDEBUG disables assertions (which makes the code faster). */  /* Defining NDEBUG disables assertions (which makes the code faster). */
 #if !defined(CONFIG_TCG_DEBUG) && !defined(NDEBUG)  #if !defined(CONFIG_DEBUG_TCG) && !defined(NDEBUG)
 # define NDEBUG  # define NDEBUG
 #endif  #endif
   
Line 52  typedef uint64_t (*helper_function)(tcg_ Line 52  typedef uint64_t (*helper_function)(tcg_
   
 /* TCI can optionally use a global register variable for env. */  /* TCI can optionally use a global register variable for env. */
 #if !defined(AREG0)  #if !defined(AREG0)
 CPUState *env;  CPUArchState *env;
 #endif  #endif
   
 /* Targets which don't use GETPC also don't need tci_tb_ptr  /* Targets which don't use GETPC also don't need tci_tb_ptr
    which makes them a little faster. */     which makes them a little faster. */
 #if defined(GETPC)  #if defined(GETPC)
 void *tci_tb_ptr;  uintptr_t tci_tb_ptr;
 #endif  #endif
   
 static tcg_target_ulong tci_reg[TCG_TARGET_NB_REGS];  static tcg_target_ulong tci_reg[TCG_TARGET_NB_REGS];
   
   #if !defined(CONFIG_TCG_PASS_AREG0)
   # define helper_ldb_mmu(env, addr, mmu_idx) __ldb_mmu(addr, mmu_idx)
   # define helper_ldw_mmu(env, addr, mmu_idx) __ldw_mmu(addr, mmu_idx)
   # define helper_ldl_mmu(env, addr, mmu_idx) __ldl_mmu(addr, mmu_idx)
   # define helper_ldq_mmu(env, addr, mmu_idx) __ldq_mmu(addr, mmu_idx)
   # define helper_stb_mmu(env, addr, val, mmu_idx) __stb_mmu(addr, val, mmu_idx)
   # define helper_stw_mmu(env, addr, val, mmu_idx) __stw_mmu(addr, val, mmu_idx)
   # define helper_stl_mmu(env, addr, val, mmu_idx) __stl_mmu(addr, val, mmu_idx)
   # define helper_stq_mmu(env, addr, val, mmu_idx) __stq_mmu(addr, val, mmu_idx)
   #endif /* !CONFIG_TCG_PASS_AREG0 */
   
 static tcg_target_ulong tci_read_reg(TCGReg index)  static tcg_target_ulong tci_read_reg(TCGReg index)
 {  {
     assert(index < ARRAY_SIZE(tci_reg));      assert(index < ARRAY_SIZE(tci_reg));
Line 429  static bool tci_compare64(uint64_t u0, u Line 440  static bool tci_compare64(uint64_t u0, u
 }  }
   
 /* Interpret pseudo code in tb. */  /* Interpret pseudo code in tb. */
 unsigned long tcg_qemu_tb_exec(CPUState *cpustate, uint8_t *tb_ptr)  tcg_target_ulong tcg_qemu_tb_exec(CPUArchState *cpustate, uint8_t *tb_ptr)
 {  {
     unsigned long next_tb = 0;      tcg_target_ulong next_tb = 0;
   
     env = cpustate;      env = cpustate;
     tci_reg[TCG_AREG0] = (tcg_target_ulong)env;      tci_reg[TCG_AREG0] = (tcg_target_ulong)env;
Line 439  unsigned long tcg_qemu_tb_exec(CPUState  Line 450  unsigned long tcg_qemu_tb_exec(CPUState 
   
     for (;;) {      for (;;) {
 #if defined(GETPC)  #if defined(GETPC)
         tci_tb_ptr = tb_ptr;          tci_tb_ptr = (uintptr_t)tb_ptr;
 #endif  #endif
         TCGOpcode opc = tb_ptr[0];          TCGOpcode opc = tb_ptr[0];
 #if !defined(NDEBUG)  #if !defined(NDEBUG)
Line 1049  unsigned long tcg_qemu_tb_exec(CPUState  Line 1060  unsigned long tcg_qemu_tb_exec(CPUState 
             t0 = *tb_ptr++;              t0 = *tb_ptr++;
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             tmp8 = __ldb_mmu(taddr, tci_read_i(&tb_ptr));              tmp8 = helper_ldb_mmu(env, taddr, tci_read_i(&tb_ptr));
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1061  unsigned long tcg_qemu_tb_exec(CPUState  Line 1072  unsigned long tcg_qemu_tb_exec(CPUState 
             t0 = *tb_ptr++;              t0 = *tb_ptr++;
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             tmp8 = __ldb_mmu(taddr, tci_read_i(&tb_ptr));              tmp8 = helper_ldb_mmu(env, taddr, tci_read_i(&tb_ptr));
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1073  unsigned long tcg_qemu_tb_exec(CPUState  Line 1084  unsigned long tcg_qemu_tb_exec(CPUState 
             t0 = *tb_ptr++;              t0 = *tb_ptr++;
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             tmp16 = __ldw_mmu(taddr, tci_read_i(&tb_ptr));              tmp16 = helper_ldw_mmu(env, taddr, tci_read_i(&tb_ptr));
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1085  unsigned long tcg_qemu_tb_exec(CPUState  Line 1096  unsigned long tcg_qemu_tb_exec(CPUState 
             t0 = *tb_ptr++;              t0 = *tb_ptr++;
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             tmp16 = __ldw_mmu(taddr, tci_read_i(&tb_ptr));              tmp16 = helper_ldw_mmu(env, taddr, tci_read_i(&tb_ptr));
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1098  unsigned long tcg_qemu_tb_exec(CPUState  Line 1109  unsigned long tcg_qemu_tb_exec(CPUState 
             t0 = *tb_ptr++;              t0 = *tb_ptr++;
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             tmp32 = __ldl_mmu(taddr, tci_read_i(&tb_ptr));              tmp32 = helper_ldl_mmu(env, taddr, tci_read_i(&tb_ptr));
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1110  unsigned long tcg_qemu_tb_exec(CPUState  Line 1121  unsigned long tcg_qemu_tb_exec(CPUState 
             t0 = *tb_ptr++;              t0 = *tb_ptr++;
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             tmp32 = __ldl_mmu(taddr, tci_read_i(&tb_ptr));              tmp32 = helper_ldl_mmu(env, taddr, tci_read_i(&tb_ptr));
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1123  unsigned long tcg_qemu_tb_exec(CPUState  Line 1134  unsigned long tcg_qemu_tb_exec(CPUState 
             t0 = *tb_ptr++;              t0 = *tb_ptr++;
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             tmp32 = __ldl_mmu(taddr, tci_read_i(&tb_ptr));              tmp32 = helper_ldl_mmu(env, taddr, tci_read_i(&tb_ptr));
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1138  unsigned long tcg_qemu_tb_exec(CPUState  Line 1149  unsigned long tcg_qemu_tb_exec(CPUState 
 #endif  #endif
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             tmp64 = __ldq_mmu(taddr, tci_read_i(&tb_ptr));              tmp64 = helper_ldq_mmu(env, taddr, tci_read_i(&tb_ptr));
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1154  unsigned long tcg_qemu_tb_exec(CPUState  Line 1165  unsigned long tcg_qemu_tb_exec(CPUState 
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             t2 = tci_read_i(&tb_ptr);              t2 = tci_read_i(&tb_ptr);
             __stb_mmu(taddr, t0, t2);              helper_stb_mmu(env, taddr, t0, t2);
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1166  unsigned long tcg_qemu_tb_exec(CPUState  Line 1177  unsigned long tcg_qemu_tb_exec(CPUState 
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             t2 = tci_read_i(&tb_ptr);              t2 = tci_read_i(&tb_ptr);
             __stw_mmu(taddr, t0, t2);              helper_stw_mmu(env, taddr, t0, t2);
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1178  unsigned long tcg_qemu_tb_exec(CPUState  Line 1189  unsigned long tcg_qemu_tb_exec(CPUState 
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             t2 = tci_read_i(&tb_ptr);              t2 = tci_read_i(&tb_ptr);
             __stl_mmu(taddr, t0, t2);              helper_stl_mmu(env, taddr, t0, t2);
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);
Line 1190  unsigned long tcg_qemu_tb_exec(CPUState  Line 1201  unsigned long tcg_qemu_tb_exec(CPUState 
             taddr = tci_read_ulong(&tb_ptr);              taddr = tci_read_ulong(&tb_ptr);
 #ifdef CONFIG_SOFTMMU  #ifdef CONFIG_SOFTMMU
             t2 = tci_read_i(&tb_ptr);              t2 = tci_read_i(&tb_ptr);
             __stq_mmu(taddr, tmp64, t2);              helper_stq_mmu(env, taddr, tmp64, t2);
 #else  #else
             host_addr = (tcg_target_ulong)taddr;              host_addr = (tcg_target_ulong)taddr;
             assert(taddr == host_addr);              assert(taddr == host_addr);

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


unix.superglobalmegacorp.com