Commit db4a4ea4eee11c41aae835012ddd9559a055f4ce

Authored by blueswir1
1 parent 902b27d0

Use a TCG global for regwptr


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4038 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 3 deletions
target-sparc/translate.c
@@ -221,7 +221,6 @@ static inline void gen_movl_reg_TN(int reg, TCGv tn) @@ -221,7 +221,6 @@ static inline void gen_movl_reg_TN(int reg, TCGv tn)
221 else if (reg < 8) 221 else if (reg < 8)
222 tcg_gen_ld_tl(tn, cpu_env, offsetof(CPUState, gregs[reg])); 222 tcg_gen_ld_tl(tn, cpu_env, offsetof(CPUState, gregs[reg]));
223 else { 223 else {
224 - tcg_gen_ld_ptr(cpu_regwptr, cpu_env, offsetof(CPUState, regwptr)); // XXX  
225 tcg_gen_ld_tl(tn, cpu_regwptr, (reg - 8) * sizeof(target_ulong)); 224 tcg_gen_ld_tl(tn, cpu_regwptr, (reg - 8) * sizeof(target_ulong));
226 } 225 }
227 } 226 }
@@ -250,7 +249,6 @@ static inline void gen_movl_TN_reg(int reg, TCGv tn) @@ -250,7 +249,6 @@ static inline void gen_movl_TN_reg(int reg, TCGv tn)
250 else if (reg < 8) 249 else if (reg < 8)
251 tcg_gen_st_tl(tn, cpu_env, offsetof(CPUState, gregs[reg])); 250 tcg_gen_st_tl(tn, cpu_env, offsetof(CPUState, gregs[reg]));
252 else { 251 else {
253 - tcg_gen_ld_ptr(cpu_regwptr, cpu_env, offsetof(CPUState, regwptr)); // XXX  
254 tcg_gen_st_tl(tn, cpu_regwptr, (reg - 8) * sizeof(target_ulong)); 252 tcg_gen_st_tl(tn, cpu_regwptr, (reg - 8) * sizeof(target_ulong));
255 } 253 }
256 } 254 }
@@ -4172,7 +4170,6 @@ static inline int gen_intermediate_code_internal(TranslationBlock * tb, @@ -4172,7 +4170,6 @@ static inline int gen_intermediate_code_internal(TranslationBlock * tb,
4172 gen_opc_end = gen_opc_buf + OPC_MAX_SIZE; 4170 gen_opc_end = gen_opc_buf + OPC_MAX_SIZE;
4173 4171
4174 cpu_tmp0 = tcg_temp_new(TCG_TYPE_TL); 4172 cpu_tmp0 = tcg_temp_new(TCG_TYPE_TL);
4175 - cpu_regwptr = tcg_temp_new(TCG_TYPE_PTR); // XXX  
4176 4173
4177 do { 4174 do {
4178 if (env->nb_breakpoints > 0) { 4175 if (env->nb_breakpoints > 0) {
@@ -4337,6 +4334,9 @@ CPUSPARCState *cpu_sparc_init(const char *cpu_model) @@ -4337,6 +4334,9 @@ CPUSPARCState *cpu_sparc_init(const char *cpu_model)
4337 4334
4338 tcg_set_macro_func(&tcg_ctx, tcg_macro_func); 4335 tcg_set_macro_func(&tcg_ctx, tcg_macro_func);
4339 cpu_env = tcg_global_reg_new(TCG_TYPE_PTR, TCG_AREG0, "env"); 4336 cpu_env = tcg_global_reg_new(TCG_TYPE_PTR, TCG_AREG0, "env");
  4337 + cpu_regwptr = tcg_global_mem_new(TCG_TYPE_PTR, TCG_AREG0,
  4338 + offsetof(CPUState, regwptr),
  4339 + "regwptr");
4340 //#if TARGET_LONG_BITS > HOST_LONG_BITS 4340 //#if TARGET_LONG_BITS > HOST_LONG_BITS
4341 #ifdef TARGET_SPARC64 4341 #ifdef TARGET_SPARC64
4342 cpu_T[0] = tcg_global_mem_new(TCG_TYPE_TL, 4342 cpu_T[0] = tcg_global_mem_new(TCG_TYPE_TL,