mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Sparc: avoid AREG0 for memory access helpers
Make memory access helpers take a parameter for CPUState instead of relying on global env. Introduce wrappers for load and store ops. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@ $(libobj-y): $(GENERATED_HEADERS)
|
||||
|
||||
# HELPER_CFLAGS is used for all the code compiled with static register
|
||||
# variables
|
||||
op_helper.o ldst_helper.o user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
|
||||
op_helper.o user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
|
||||
|
||||
# Note: this is a workaround. The real fix is to avoid compiling
|
||||
# cpu_signal_handler() in user-exec.c.
|
||||
|
||||
+83
-1
@@ -586,8 +586,90 @@ void cpu_unassigned_access(CPUSPARCState *env1, target_phys_addr_t addr,
|
||||
#if defined(TARGET_SPARC64)
|
||||
target_phys_addr_t cpu_get_phys_page_nofault(CPUSPARCState *env, target_ulong addr,
|
||||
int mmu_idx);
|
||||
|
||||
#endif
|
||||
|
||||
#define WRAP_LD(rettype, fn) \
|
||||
rettype cpu_ ## fn (CPUSPARCState *env1, target_ulong addr)
|
||||
|
||||
WRAP_LD(uint32_t, ldub_kernel);
|
||||
WRAP_LD(uint32_t, lduw_kernel);
|
||||
WRAP_LD(uint32_t, ldl_kernel);
|
||||
WRAP_LD(uint64_t, ldq_kernel);
|
||||
|
||||
WRAP_LD(uint32_t, ldub_user);
|
||||
WRAP_LD(uint32_t, lduw_user);
|
||||
WRAP_LD(uint32_t, ldl_user);
|
||||
WRAP_LD(uint64_t, ldq_user);
|
||||
|
||||
WRAP_LD(uint64_t, ldfq_kernel);
|
||||
WRAP_LD(uint64_t, ldfq_user);
|
||||
|
||||
#ifdef TARGET_SPARC64
|
||||
WRAP_LD(uint32_t, ldub_hypv);
|
||||
WRAP_LD(uint32_t, lduw_hypv);
|
||||
WRAP_LD(uint32_t, ldl_hypv);
|
||||
WRAP_LD(uint64_t, ldq_hypv);
|
||||
|
||||
WRAP_LD(uint64_t, ldfq_hypv);
|
||||
|
||||
WRAP_LD(uint32_t, ldub_nucleus);
|
||||
WRAP_LD(uint32_t, lduw_nucleus);
|
||||
WRAP_LD(uint32_t, ldl_nucleus);
|
||||
WRAP_LD(uint64_t, ldq_nucleus);
|
||||
|
||||
WRAP_LD(uint32_t, ldub_kernel_secondary);
|
||||
WRAP_LD(uint32_t, lduw_kernel_secondary);
|
||||
WRAP_LD(uint32_t, ldl_kernel_secondary);
|
||||
WRAP_LD(uint64_t, ldq_kernel_secondary);
|
||||
|
||||
WRAP_LD(uint32_t, ldub_user_secondary);
|
||||
WRAP_LD(uint32_t, lduw_user_secondary);
|
||||
WRAP_LD(uint32_t, ldl_user_secondary);
|
||||
WRAP_LD(uint64_t, ldq_user_secondary);
|
||||
#endif
|
||||
#undef WRAP_LD
|
||||
|
||||
#define WRAP_ST(datatype, fn) \
|
||||
void cpu_ ## fn (CPUSPARCState *env1, target_ulong addr, datatype val)
|
||||
|
||||
WRAP_ST(uint32_t, stb_kernel);
|
||||
WRAP_ST(uint32_t, stw_kernel);
|
||||
WRAP_ST(uint32_t, stl_kernel);
|
||||
WRAP_ST(uint64_t, stq_kernel);
|
||||
|
||||
WRAP_ST(uint32_t, stb_user);
|
||||
WRAP_ST(uint32_t, stw_user);
|
||||
WRAP_ST(uint32_t, stl_user);
|
||||
WRAP_ST(uint64_t, stq_user);
|
||||
|
||||
WRAP_ST(uint64_t, stfq_kernel);
|
||||
WRAP_ST(uint64_t, stfq_user);
|
||||
|
||||
#ifdef TARGET_SPARC64
|
||||
WRAP_ST(uint32_t, stb_hypv);
|
||||
WRAP_ST(uint32_t, stw_hypv);
|
||||
WRAP_ST(uint32_t, stl_hypv);
|
||||
WRAP_ST(uint64_t, stq_hypv);
|
||||
|
||||
WRAP_ST(uint64_t, stfq_hypv);
|
||||
|
||||
WRAP_ST(uint32_t, stb_nucleus);
|
||||
WRAP_ST(uint32_t, stw_nucleus);
|
||||
WRAP_ST(uint32_t, stl_nucleus);
|
||||
WRAP_ST(uint64_t, stq_nucleus);
|
||||
|
||||
WRAP_ST(uint32_t, stb_kernel_secondary);
|
||||
WRAP_ST(uint32_t, stw_kernel_secondary);
|
||||
WRAP_ST(uint32_t, stl_kernel_secondary);
|
||||
WRAP_ST(uint64_t, stq_kernel_secondary);
|
||||
|
||||
WRAP_ST(uint32_t, stb_user_secondary);
|
||||
WRAP_ST(uint32_t, stw_user_secondary);
|
||||
WRAP_ST(uint32_t, stl_user_secondary);
|
||||
WRAP_ST(uint64_t, stq_user_secondary);
|
||||
#endif
|
||||
|
||||
#undef WRAP_ST
|
||||
#endif
|
||||
int cpu_sparc_signal_handler(int host_signum, void *pinfo, void *puc);
|
||||
|
||||
|
||||
+10
-10
@@ -18,11 +18,11 @@ DEF_HELPER_1(rdcwp, tl, env)
|
||||
DEF_HELPER_2(wrcwp, void, env, tl)
|
||||
DEF_HELPER_FLAGS_2(array8, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl)
|
||||
DEF_HELPER_1(popc, tl, tl)
|
||||
DEF_HELPER_3(ldda_asi, void, tl, int, int)
|
||||
DEF_HELPER_4(ldf_asi, void, tl, int, int, int)
|
||||
DEF_HELPER_4(stf_asi, void, tl, int, int, int)
|
||||
DEF_HELPER_4(cas_asi, tl, tl, tl, tl, i32)
|
||||
DEF_HELPER_4(casx_asi, tl, tl, tl, tl, i32)
|
||||
DEF_HELPER_4(ldda_asi, void, env, tl, int, int)
|
||||
DEF_HELPER_5(ldf_asi, void, env, tl, int, int, int)
|
||||
DEF_HELPER_5(stf_asi, void, env, tl, int, int, int)
|
||||
DEF_HELPER_5(cas_asi, tl, env, tl, tl, tl, i32)
|
||||
DEF_HELPER_5(casx_asi, tl, env, tl, tl, tl, i32)
|
||||
DEF_HELPER_2(set_softint, void, env, i64)
|
||||
DEF_HELPER_2(clear_softint, void, env, i64)
|
||||
DEF_HELPER_2(write_softint, void, env, i64)
|
||||
@@ -30,7 +30,7 @@ DEF_HELPER_2(tick_set_count, void, ptr, i64)
|
||||
DEF_HELPER_1(tick_get_count, i64, ptr)
|
||||
DEF_HELPER_2(tick_set_limit, void, ptr, i64)
|
||||
#endif
|
||||
DEF_HELPER_2(check_align, void, tl, i32)
|
||||
DEF_HELPER_3(check_align, void, env, tl, i32)
|
||||
DEF_HELPER_1(debug, void, env)
|
||||
DEF_HELPER_1(save, void, env)
|
||||
DEF_HELPER_1(restore, void, env)
|
||||
@@ -38,11 +38,11 @@ DEF_HELPER_3(udiv, tl, env, tl, tl)
|
||||
DEF_HELPER_3(udiv_cc, tl, env, tl, tl)
|
||||
DEF_HELPER_3(sdiv, tl, env, tl, tl)
|
||||
DEF_HELPER_3(sdiv_cc, tl, env, tl, tl)
|
||||
DEF_HELPER_2(ldqf, void, tl, int)
|
||||
DEF_HELPER_2(stqf, void, tl, int)
|
||||
DEF_HELPER_3(ldqf, void, env, tl, int)
|
||||
DEF_HELPER_3(stqf, void, env, tl, int)
|
||||
#if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64)
|
||||
DEF_HELPER_4(ld_asi, i64, tl, int, int, int)
|
||||
DEF_HELPER_4(st_asi, void, tl, i64, int, int)
|
||||
DEF_HELPER_5(ld_asi, i64, env, tl, int, int, int)
|
||||
DEF_HELPER_5(st_asi, void, env, tl, i64, int, int)
|
||||
#endif
|
||||
DEF_HELPER_2(ldfsr, void, env, i32)
|
||||
DEF_HELPER_FLAGS_1(fabss, TCG_CALL_CONST | TCG_CALL_PURE, f32, f32)
|
||||
|
||||
+167
-189
File diff suppressed because it is too large
Load Diff
+101
-1
@@ -3,6 +3,7 @@
|
||||
#include "helper.h"
|
||||
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
#include "softmmu_exec.h"
|
||||
static void do_unaligned_access(target_ulong addr, int is_write, int is_user,
|
||||
void *retaddr);
|
||||
|
||||
@@ -71,4 +72,103 @@ void tlb_fill(CPUSPARCState *env1, target_ulong addr, int is_write, int mmu_idx,
|
||||
env = saved_env;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
#define WRAP_LD(rettype, fn) \
|
||||
rettype cpu_ ## fn (CPUSPARCState *env1, target_ulong addr) \
|
||||
{ \
|
||||
CPUSPARCState *saved_env; \
|
||||
rettype ret; \
|
||||
\
|
||||
saved_env = env; \
|
||||
env = env1; \
|
||||
ret = fn(addr); \
|
||||
env = saved_env; \
|
||||
return ret; \
|
||||
}
|
||||
|
||||
WRAP_LD(uint32_t, ldub_kernel)
|
||||
WRAP_LD(uint32_t, lduw_kernel)
|
||||
WRAP_LD(uint32_t, ldl_kernel)
|
||||
WRAP_LD(uint64_t, ldq_kernel)
|
||||
|
||||
WRAP_LD(uint32_t, ldub_user)
|
||||
WRAP_LD(uint32_t, lduw_user)
|
||||
WRAP_LD(uint32_t, ldl_user)
|
||||
WRAP_LD(uint64_t, ldq_user)
|
||||
|
||||
WRAP_LD(uint64_t, ldfq_kernel)
|
||||
WRAP_LD(uint64_t, ldfq_user)
|
||||
#ifdef TARGET_SPARC64
|
||||
WRAP_LD(uint32_t, ldub_hypv)
|
||||
WRAP_LD(uint32_t, lduw_hypv)
|
||||
WRAP_LD(uint32_t, ldl_hypv)
|
||||
WRAP_LD(uint64_t, ldq_hypv)
|
||||
|
||||
WRAP_LD(uint64_t, ldfq_hypv)
|
||||
|
||||
WRAP_LD(uint32_t, ldub_nucleus)
|
||||
WRAP_LD(uint32_t, lduw_nucleus)
|
||||
WRAP_LD(uint32_t, ldl_nucleus)
|
||||
WRAP_LD(uint64_t, ldq_nucleus)
|
||||
|
||||
WRAP_LD(uint32_t, ldub_kernel_secondary)
|
||||
WRAP_LD(uint32_t, lduw_kernel_secondary)
|
||||
WRAP_LD(uint32_t, ldl_kernel_secondary)
|
||||
WRAP_LD(uint64_t, ldq_kernel_secondary)
|
||||
|
||||
WRAP_LD(uint32_t, ldub_user_secondary)
|
||||
WRAP_LD(uint32_t, lduw_user_secondary)
|
||||
WRAP_LD(uint32_t, ldl_user_secondary)
|
||||
WRAP_LD(uint64_t, ldq_user_secondary)
|
||||
#endif
|
||||
#undef WRAP_LD
|
||||
|
||||
#define WRAP_ST(datatype, fn) \
|
||||
void cpu_ ## fn (CPUSPARCState *env1, target_ulong addr, datatype val) \
|
||||
{ \
|
||||
CPUSPARCState *saved_env; \
|
||||
\
|
||||
saved_env = env; \
|
||||
env = env1; \
|
||||
fn(addr, val); \
|
||||
env = saved_env; \
|
||||
}
|
||||
|
||||
WRAP_ST(uint32_t, stb_kernel)
|
||||
WRAP_ST(uint32_t, stw_kernel)
|
||||
WRAP_ST(uint32_t, stl_kernel)
|
||||
WRAP_ST(uint64_t, stq_kernel)
|
||||
|
||||
WRAP_ST(uint32_t, stb_user)
|
||||
WRAP_ST(uint32_t, stw_user)
|
||||
WRAP_ST(uint32_t, stl_user)
|
||||
WRAP_ST(uint64_t, stq_user)
|
||||
|
||||
WRAP_ST(uint64_t, stfq_kernel)
|
||||
WRAP_ST(uint64_t, stfq_user)
|
||||
|
||||
#ifdef TARGET_SPARC64
|
||||
WRAP_ST(uint32_t, stb_hypv)
|
||||
WRAP_ST(uint32_t, stw_hypv)
|
||||
WRAP_ST(uint32_t, stl_hypv)
|
||||
WRAP_ST(uint64_t, stq_hypv)
|
||||
|
||||
WRAP_ST(uint64_t, stfq_hypv)
|
||||
|
||||
WRAP_ST(uint32_t, stb_nucleus)
|
||||
WRAP_ST(uint32_t, stw_nucleus)
|
||||
WRAP_ST(uint32_t, stl_nucleus)
|
||||
WRAP_ST(uint64_t, stq_nucleus)
|
||||
|
||||
WRAP_ST(uint32_t, stb_kernel_secondary)
|
||||
WRAP_ST(uint32_t, stw_kernel_secondary)
|
||||
WRAP_ST(uint32_t, stl_kernel_secondary)
|
||||
WRAP_ST(uint64_t, stq_kernel_secondary)
|
||||
|
||||
WRAP_ST(uint32_t, stb_user_secondary)
|
||||
WRAP_ST(uint32_t, stw_user_secondary)
|
||||
WRAP_ST(uint32_t, stl_user_secondary)
|
||||
WRAP_ST(uint64_t, stq_user_secondary)
|
||||
#endif
|
||||
|
||||
#undef WRAP_ST
|
||||
#endif
|
||||
|
||||
+27
-25
@@ -1955,7 +1955,7 @@ static inline void gen_ld_asi(TCGv dst, TCGv addr, int insn, int size,
|
||||
r_asi = gen_get_asi(insn, addr);
|
||||
r_size = tcg_const_i32(size);
|
||||
r_sign = tcg_const_i32(sign);
|
||||
gen_helper_ld_asi(dst, addr, r_asi, r_size, r_sign);
|
||||
gen_helper_ld_asi(dst, cpu_env, addr, r_asi, r_size, r_sign);
|
||||
tcg_temp_free_i32(r_sign);
|
||||
tcg_temp_free_i32(r_size);
|
||||
tcg_temp_free_i32(r_asi);
|
||||
@@ -1967,7 +1967,7 @@ static inline void gen_st_asi(TCGv src, TCGv addr, int insn, int size)
|
||||
|
||||
r_asi = gen_get_asi(insn, addr);
|
||||
r_size = tcg_const_i32(size);
|
||||
gen_helper_st_asi(addr, src, r_asi, r_size);
|
||||
gen_helper_st_asi(cpu_env, addr, src, r_asi, r_size);
|
||||
tcg_temp_free_i32(r_size);
|
||||
tcg_temp_free_i32(r_asi);
|
||||
}
|
||||
@@ -1979,7 +1979,7 @@ static inline void gen_ldf_asi(TCGv addr, int insn, int size, int rd)
|
||||
r_asi = gen_get_asi(insn, addr);
|
||||
r_size = tcg_const_i32(size);
|
||||
r_rd = tcg_const_i32(rd);
|
||||
gen_helper_ldf_asi(addr, r_asi, r_size, r_rd);
|
||||
gen_helper_ldf_asi(cpu_env, addr, r_asi, r_size, r_rd);
|
||||
tcg_temp_free_i32(r_rd);
|
||||
tcg_temp_free_i32(r_size);
|
||||
tcg_temp_free_i32(r_asi);
|
||||
@@ -1992,7 +1992,7 @@ static inline void gen_stf_asi(TCGv addr, int insn, int size, int rd)
|
||||
r_asi = gen_get_asi(insn, addr);
|
||||
r_size = tcg_const_i32(size);
|
||||
r_rd = tcg_const_i32(rd);
|
||||
gen_helper_stf_asi(addr, r_asi, r_size, r_rd);
|
||||
gen_helper_stf_asi(cpu_env, addr, r_asi, r_size, r_rd);
|
||||
tcg_temp_free_i32(r_rd);
|
||||
tcg_temp_free_i32(r_size);
|
||||
tcg_temp_free_i32(r_asi);
|
||||
@@ -2005,9 +2005,9 @@ static inline void gen_swap_asi(TCGv dst, TCGv addr, int insn)
|
||||
r_asi = gen_get_asi(insn, addr);
|
||||
r_size = tcg_const_i32(4);
|
||||
r_sign = tcg_const_i32(0);
|
||||
gen_helper_ld_asi(cpu_tmp64, addr, r_asi, r_size, r_sign);
|
||||
gen_helper_ld_asi(cpu_tmp64, cpu_env, addr, r_asi, r_size, r_sign);
|
||||
tcg_temp_free_i32(r_sign);
|
||||
gen_helper_st_asi(addr, dst, r_asi, r_size);
|
||||
gen_helper_st_asi(cpu_env, addr, dst, r_asi, r_size);
|
||||
tcg_temp_free_i32(r_size);
|
||||
tcg_temp_free_i32(r_asi);
|
||||
tcg_gen_trunc_i64_tl(dst, cpu_tmp64);
|
||||
@@ -2019,7 +2019,7 @@ static inline void gen_ldda_asi(TCGv hi, TCGv addr, int insn, int rd)
|
||||
|
||||
r_asi = gen_get_asi(insn, addr);
|
||||
r_rd = tcg_const_i32(rd);
|
||||
gen_helper_ldda_asi(addr, r_asi, r_rd);
|
||||
gen_helper_ldda_asi(cpu_env, addr, r_asi, r_rd);
|
||||
tcg_temp_free_i32(r_rd);
|
||||
tcg_temp_free_i32(r_asi);
|
||||
}
|
||||
@@ -2032,7 +2032,7 @@ static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd)
|
||||
tcg_gen_concat_tl_i64(cpu_tmp64, cpu_tmp0, hi);
|
||||
r_asi = gen_get_asi(insn, addr);
|
||||
r_size = tcg_const_i32(8);
|
||||
gen_helper_st_asi(addr, cpu_tmp64, r_asi, r_size);
|
||||
gen_helper_st_asi(cpu_env, addr, cpu_tmp64, r_asi, r_size);
|
||||
tcg_temp_free_i32(r_size);
|
||||
tcg_temp_free_i32(r_asi);
|
||||
}
|
||||
@@ -2046,7 +2046,7 @@ static inline void gen_cas_asi(TCGv dst, TCGv addr, TCGv val2, int insn,
|
||||
r_val1 = tcg_temp_new();
|
||||
gen_movl_reg_TN(rd, r_val1);
|
||||
r_asi = gen_get_asi(insn, addr);
|
||||
gen_helper_cas_asi(dst, addr, r_val1, val2, r_asi);
|
||||
gen_helper_cas_asi(dst, cpu_env, addr, r_val1, val2, r_asi);
|
||||
tcg_temp_free_i32(r_asi);
|
||||
tcg_temp_free(r_val1);
|
||||
}
|
||||
@@ -2058,7 +2058,7 @@ static inline void gen_casx_asi(TCGv dst, TCGv addr, TCGv val2, int insn,
|
||||
|
||||
gen_movl_reg_TN(rd, cpu_tmp64);
|
||||
r_asi = gen_get_asi(insn, addr);
|
||||
gen_helper_casx_asi(dst, addr, cpu_tmp64, val2, r_asi);
|
||||
gen_helper_casx_asi(dst, cpu_env, addr, cpu_tmp64, val2, r_asi);
|
||||
tcg_temp_free_i32(r_asi);
|
||||
}
|
||||
|
||||
@@ -2072,7 +2072,7 @@ static inline void gen_ld_asi(TCGv dst, TCGv addr, int insn, int size,
|
||||
r_asi = tcg_const_i32(GET_FIELD(insn, 19, 26));
|
||||
r_size = tcg_const_i32(size);
|
||||
r_sign = tcg_const_i32(sign);
|
||||
gen_helper_ld_asi(cpu_tmp64, addr, r_asi, r_size, r_sign);
|
||||
gen_helper_ld_asi(cpu_tmp64, cpu_env, addr, r_asi, r_size, r_sign);
|
||||
tcg_temp_free(r_sign);
|
||||
tcg_temp_free(r_size);
|
||||
tcg_temp_free(r_asi);
|
||||
@@ -2086,7 +2086,7 @@ static inline void gen_st_asi(TCGv src, TCGv addr, int insn, int size)
|
||||
tcg_gen_extu_tl_i64(cpu_tmp64, src);
|
||||
r_asi = tcg_const_i32(GET_FIELD(insn, 19, 26));
|
||||
r_size = tcg_const_i32(size);
|
||||
gen_helper_st_asi(addr, cpu_tmp64, r_asi, r_size);
|
||||
gen_helper_st_asi(cpu_env, addr, cpu_tmp64, r_asi, r_size);
|
||||
tcg_temp_free(r_size);
|
||||
tcg_temp_free(r_asi);
|
||||
}
|
||||
@@ -2099,11 +2099,11 @@ static inline void gen_swap_asi(TCGv dst, TCGv addr, int insn)
|
||||
r_asi = tcg_const_i32(GET_FIELD(insn, 19, 26));
|
||||
r_size = tcg_const_i32(4);
|
||||
r_sign = tcg_const_i32(0);
|
||||
gen_helper_ld_asi(cpu_tmp64, addr, r_asi, r_size, r_sign);
|
||||
gen_helper_ld_asi(cpu_tmp64, cpu_env, addr, r_asi, r_size, r_sign);
|
||||
tcg_temp_free(r_sign);
|
||||
r_val = tcg_temp_new_i64();
|
||||
tcg_gen_extu_tl_i64(r_val, dst);
|
||||
gen_helper_st_asi(addr, r_val, r_asi, r_size);
|
||||
gen_helper_st_asi(cpu_env, addr, r_val, r_asi, r_size);
|
||||
tcg_temp_free_i64(r_val);
|
||||
tcg_temp_free(r_size);
|
||||
tcg_temp_free(r_asi);
|
||||
@@ -2117,7 +2117,7 @@ static inline void gen_ldda_asi(TCGv hi, TCGv addr, int insn, int rd)
|
||||
r_asi = tcg_const_i32(GET_FIELD(insn, 19, 26));
|
||||
r_size = tcg_const_i32(8);
|
||||
r_sign = tcg_const_i32(0);
|
||||
gen_helper_ld_asi(cpu_tmp64, addr, r_asi, r_size, r_sign);
|
||||
gen_helper_ld_asi(cpu_tmp64, cpu_env, addr, r_asi, r_size, r_sign);
|
||||
tcg_temp_free(r_sign);
|
||||
tcg_temp_free(r_size);
|
||||
tcg_temp_free(r_asi);
|
||||
@@ -2136,7 +2136,7 @@ static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd)
|
||||
tcg_gen_concat_tl_i64(cpu_tmp64, cpu_tmp0, hi);
|
||||
r_asi = tcg_const_i32(GET_FIELD(insn, 19, 26));
|
||||
r_size = tcg_const_i32(8);
|
||||
gen_helper_st_asi(addr, cpu_tmp64, r_asi, r_size);
|
||||
gen_helper_st_asi(cpu_env, addr, cpu_tmp64, r_asi, r_size);
|
||||
tcg_temp_free(r_size);
|
||||
tcg_temp_free(r_asi);
|
||||
}
|
||||
@@ -2153,7 +2153,7 @@ static inline void gen_ldstub_asi(TCGv dst, TCGv addr, int insn)
|
||||
r_val = tcg_const_i64(0xffULL);
|
||||
r_asi = tcg_const_i32(GET_FIELD(insn, 19, 26));
|
||||
r_size = tcg_const_i32(1);
|
||||
gen_helper_st_asi(addr, r_val, r_asi, r_size);
|
||||
gen_helper_st_asi(cpu_env, addr, r_val, r_asi, r_size);
|
||||
tcg_temp_free_i32(r_size);
|
||||
tcg_temp_free_i32(r_asi);
|
||||
tcg_temp_free_i64(r_val);
|
||||
@@ -4547,7 +4547,7 @@ static void disas_sparc_insn(DisasContext * dc)
|
||||
gen_helper_restore(cpu_env);
|
||||
gen_mov_pc_npc(dc, cpu_cond);
|
||||
r_const = tcg_const_i32(3);
|
||||
gen_helper_check_align(cpu_dst, r_const);
|
||||
gen_helper_check_align(cpu_env, cpu_dst, r_const);
|
||||
tcg_temp_free_i32(r_const);
|
||||
tcg_gen_mov_tl(cpu_npc, cpu_dst);
|
||||
dc->npc = DYNAMIC_PC;
|
||||
@@ -4577,7 +4577,7 @@ static void disas_sparc_insn(DisasContext * dc)
|
||||
tcg_temp_free(r_pc);
|
||||
gen_mov_pc_npc(dc, cpu_cond);
|
||||
r_const = tcg_const_i32(3);
|
||||
gen_helper_check_align(cpu_dst, r_const);
|
||||
gen_helper_check_align(cpu_env, cpu_dst, r_const);
|
||||
tcg_temp_free_i32(r_const);
|
||||
tcg_gen_mov_tl(cpu_npc, cpu_dst);
|
||||
dc->npc = DYNAMIC_PC;
|
||||
@@ -4592,7 +4592,7 @@ static void disas_sparc_insn(DisasContext * dc)
|
||||
goto priv_insn;
|
||||
gen_mov_pc_npc(dc, cpu_cond);
|
||||
r_const = tcg_const_i32(3);
|
||||
gen_helper_check_align(cpu_dst, r_const);
|
||||
gen_helper_check_align(cpu_env, cpu_dst, r_const);
|
||||
tcg_temp_free_i32(r_const);
|
||||
tcg_gen_mov_tl(cpu_npc, cpu_dst);
|
||||
dc->npc = DYNAMIC_PC;
|
||||
@@ -4696,7 +4696,8 @@ static void disas_sparc_insn(DisasContext * dc)
|
||||
|
||||
save_state(dc, cpu_cond);
|
||||
r_const = tcg_const_i32(7);
|
||||
gen_helper_check_align(cpu_addr, r_const); // XXX remove
|
||||
/* XXX remove alignment check */
|
||||
gen_helper_check_align(cpu_env, cpu_addr, r_const);
|
||||
tcg_temp_free_i32(r_const);
|
||||
gen_address_mask(dc, cpu_addr);
|
||||
tcg_gen_qemu_ld64(cpu_tmp64, cpu_addr, dc->mem_idx);
|
||||
@@ -4921,7 +4922,7 @@ static void disas_sparc_insn(DisasContext * dc)
|
||||
CHECK_FPU_FEATURE(dc, FLOAT128);
|
||||
r_const = tcg_const_i32(dc->mem_idx);
|
||||
gen_address_mask(dc, cpu_addr);
|
||||
gen_helper_ldqf(cpu_addr, r_const);
|
||||
gen_helper_ldqf(cpu_env, cpu_addr, r_const);
|
||||
tcg_temp_free_i32(r_const);
|
||||
gen_op_store_QT0_fpr(QFPREG(rd));
|
||||
gen_update_fprs_dirty(QFPREG(rd));
|
||||
@@ -4961,7 +4962,8 @@ static void disas_sparc_insn(DisasContext * dc)
|
||||
save_state(dc, cpu_cond);
|
||||
gen_address_mask(dc, cpu_addr);
|
||||
r_const = tcg_const_i32(7);
|
||||
gen_helper_check_align(cpu_addr, r_const); // XXX remove
|
||||
/* XXX remove alignment check */
|
||||
gen_helper_check_align(cpu_env, cpu_addr, r_const);
|
||||
tcg_temp_free_i32(r_const);
|
||||
gen_movl_reg_TN(rd + 1, cpu_tmp0);
|
||||
tcg_gen_concat_tl_i64(cpu_tmp64, cpu_tmp0, cpu_val);
|
||||
@@ -5065,7 +5067,7 @@ static void disas_sparc_insn(DisasContext * dc)
|
||||
gen_op_load_fpr_QT0(QFPREG(rd));
|
||||
r_const = tcg_const_i32(dc->mem_idx);
|
||||
gen_address_mask(dc, cpu_addr);
|
||||
gen_helper_stqf(cpu_addr, r_const);
|
||||
gen_helper_stqf(cpu_env, cpu_addr, r_const);
|
||||
tcg_temp_free_i32(r_const);
|
||||
}
|
||||
break;
|
||||
@@ -5108,7 +5110,7 @@ static void disas_sparc_insn(DisasContext * dc)
|
||||
goto jmp_insn;
|
||||
}
|
||||
r_const = tcg_const_i32(7);
|
||||
gen_helper_check_align(cpu_addr, r_const);
|
||||
gen_helper_check_align(cpu_env, cpu_addr, r_const);
|
||||
tcg_temp_free_i32(r_const);
|
||||
gen_stf_asi(cpu_addr, insn, 16, QFPREG(rd));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user