Commit 918d9a2c authored by Richard Henderson's avatar Richard Henderson
Browse files

target-sparc: Remove asi helper code handled inline



Now that we never call out to helpers when direct accesses can
handle an asi, remove the corresponding code in those helpers.
For ldda, this removes the entire helper.

Tested-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
parent 34810610
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ DEF_HELPER_1(rdcwp, tl, env)
DEF_HELPER_2(wrcwp, void, env, tl)
DEF_HELPER_FLAGS_2(array8, TCG_CALL_NO_RWG_SE, tl, tl, tl)
DEF_HELPER_FLAGS_1(popc, TCG_CALL_NO_RWG_SE, tl, tl)
DEF_HELPER_FLAGS_3(ldda_asi, TCG_CALL_NO_WG, void, env, tl, int)
DEF_HELPER_FLAGS_2(set_softint, TCG_CALL_NO_RWG, void, env, i64)
DEF_HELPER_FLAGS_2(clear_softint, TCG_CALL_NO_RWG, void, env, i64)
DEF_HELPER_FLAGS_2(write_softint, TCG_CALL_NO_RWG, void, env, i64)
+130 −681

File changed.

Preview size limit exceeded, changes collapsed.

+26 −8
Original line number Diff line number Diff line
@@ -2652,15 +2652,27 @@ static void gen_ldda_asi(DisasContext *dc, TCGv addr, int insn, int rd)
        break;

    default:
        /* ??? In theory we've handled all of the ASIs that are valid
           for ldda, and this should raise DAE_invalid_asi.  However,
           real hardware allows others.  This can be seen with e.g.
           FreeBSD 10.3 wrt ASI_IC_TAG.  */
        {
            TCGv_i32 r_asi = tcg_const_i32(da.asi);
            TCGv_i32 r_mop = tcg_const_i32(da.memop);
            TCGv_i64 tmp = tcg_temp_new_i64();

            save_state(dc);
            gen_helper_ldda_asi(cpu_env, addr, r_asi);
            gen_helper_ld_asi(tmp, cpu_env, addr, r_asi, r_mop);
            tcg_temp_free_i32(r_asi);
            tcg_temp_free_i32(r_mop);

            tcg_gen_ld_i64(hi, cpu_env, offsetof(CPUSPARCState, qt0.high));
            tcg_gen_ld_i64(lo, cpu_env, offsetof(CPUSPARCState, qt0.low));
            /* See above.  */
            if ((da.memop & MO_BSWAP) == MO_TE) {
                tcg_gen_extr32_i64(lo, hi, tmp);
            } else {
                tcg_gen_extr32_i64(hi, lo, tmp);
            }
            tcg_temp_free_i64(tmp);
        }
        break;
    }
@@ -2705,15 +2717,21 @@ static void gen_stda_asi(DisasContext *dc, TCGv hi, TCGv addr,
        break;

    default:
        /* ??? In theory we've handled all of the ASIs that are valid
           for stda, and this should raise DAE_invalid_asi.  */
        {
            TCGv_i32 r_asi = tcg_const_i32(da.asi);
            TCGv_i32 r_mop = tcg_const_i32(MO_Q);
            TCGv_i64 t64;
            TCGv_i32 r_mop = tcg_const_i32(da.memop);
            TCGv_i64 t64 = tcg_temp_new_i64();

            save_state(dc);
            /* See above.  */
            if ((da.memop & MO_BSWAP) == MO_TE) {
                tcg_gen_concat32_i64(t64, lo, hi);
            } else {
                tcg_gen_concat32_i64(t64, hi, lo);
            }

            t64 = tcg_temp_new_i64();
            tcg_gen_concat_tl_i64(t64, lo, hi);
            save_state(dc);
            gen_helper_st_asi(cpu_env, addr, t64, r_asi, r_mop);
            tcg_temp_free_i32(r_mop);
            tcg_temp_free_i32(r_asi);