From a3a71110145fa23e05007807977556a4b0769263 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 31 Jan 2017 10:51:54 +0100 Subject: [PATCH] target/sparc: Fix boot with SS20 ROM This partially reverts commit fbb4bbb62e5603c991b880e25dc4bb30d342b944. Signed-off-by: Stefan Weil --- target/sparc/translate.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 655060cd9a..a58ad3e1a7 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -2448,8 +2448,32 @@ static void gen_ldstub_asi(DisasContext *dc, TCGv dst, TCGv addr, int insn) gen_ldstub(dc, dst, addr, da.mem_idx); break; default: +#if 0 /* ??? Should be DAE_invalid_asi. */ gen_exception(dc, TT_DATA_ACCESS); +#else + fprintf(stderr, "%s:%u - %s, ASIType = %d\n", + __FILE__, __LINE__, __func__, da.type); + + { + TCGv_i32 r_asi = tcg_const_i32(da.asi); + TCGv_i32 r_mop = tcg_const_i32(MO_UB); + TCGv_i64 s64, t64; + + save_state(dc); + t64 = tcg_temp_new_i64(); + gen_helper_ld_asi(t64, cpu_env, addr, r_asi, r_mop); + + s64 = tcg_const_i64(0xff); + gen_helper_st_asi(cpu_env, addr, s64, r_asi, r_mop); + tcg_temp_free_i64(s64); + tcg_temp_free_i32(r_mop); + tcg_temp_free_i32(r_asi); + + tcg_gen_trunc_i64_tl(dst, t64); + tcg_temp_free_i64(t64); + } +#endif break; } } -- 2.11.4.GIT