return (int32_t)cpu_mips_get_count(env);
}
-target_ulong helper_mfc0_saar(CPUMIPSState *env)
-{
- if ((env->CP0_SAARI & 0x3f) < 2) {
- return (int32_t) env->CP0_SAAR[env->CP0_SAARI & 0x3f];
- }
- return 0;
-}
-
-target_ulong helper_mfhc0_saar(CPUMIPSState *env)
-{
- if ((env->CP0_SAARI & 0x3f) < 2) {
- return env->CP0_SAAR[env->CP0_SAARI & 0x3f] >> 32;
- }
- return 0;
-}
-
target_ulong helper_mftc0_entryhi(CPUMIPSState *env)
{
int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
return env->CP0_WatchHi[sel];
}
-target_ulong helper_dmfc0_saar(CPUMIPSState *env)
-{
- if ((env->CP0_SAARI & 0x3f) < 2) {
- return env->CP0_SAAR[env->CP0_SAARI & 0x3f];
- }
- return 0;
-}
#endif /* TARGET_MIPS64 */
void helper_mtc0_index(CPUMIPSState *env, target_ulong arg1)
}
}
-void helper_mtc0_saar(CPUMIPSState *env, target_ulong arg1)
-{
- uint32_t target = env->CP0_SAARI & 0x3f;
- if (target < 2) {
- env->CP0_SAAR[target] = arg1 & 0x00000ffffffff03fULL;
- switch (target) {
- case 0:
- if (env->itu) {
- itc_reconfigure(env->itu);
- }
- break;
- }
- }
-}
-
-void helper_mthc0_saar(CPUMIPSState *env, target_ulong arg1)
-{
- uint32_t target = env->CP0_SAARI & 0x3f;
- if (target < 2) {
- env->CP0_SAAR[target] =
- (((uint64_t) arg1 << 32) & 0x00000fff00000000ULL) |
- (env->CP0_SAAR[target] & 0x00000000ffffffffULL);
- switch (target) {
- case 0:
- if (env->itu) {
- itc_reconfigure(env->itu);
- }
- break;
- }
- }
-}
-
void helper_mtc0_entryhi(CPUMIPSState *env, target_ulong arg1)
{
target_ulong old, val, mask;
DEF_HELPER_1(mfc0_tcschefback, tl, env)
DEF_HELPER_1(mftc0_tcschefback, tl, env)
DEF_HELPER_1(mfc0_count, tl, env)
-DEF_HELPER_1(mfc0_saar, tl, env)
-DEF_HELPER_1(mfhc0_saar, tl, env)
DEF_HELPER_1(mftc0_entryhi, tl, env)
DEF_HELPER_1(mftc0_status, tl, env)
DEF_HELPER_1(mftc0_cause, tl, env)
DEF_HELPER_1(dmfc0_maar, tl, env)
DEF_HELPER_2(dmfc0_watchlo, tl, env, i32)
DEF_HELPER_2(dmfc0_watchhi, tl, env, i32)
-DEF_HELPER_1(dmfc0_saar, tl, env)
#endif /* TARGET_MIPS64 */
DEF_HELPER_2(mtc0_index, void, env, tl)
DEF_HELPER_2(mtc0_pwctl, void, env, tl)
DEF_HELPER_2(mtc0_count, void, env, tl)
DEF_HELPER_2(mtc0_saari, void, env, tl)
-DEF_HELPER_2(mtc0_saar, void, env, tl)
-DEF_HELPER_2(mthc0_saar, void, env, tl)
DEF_HELPER_2(mtc0_entryhi, void, env, tl)
DEF_HELPER_2(mttc0_entryhi, void, env, tl)
DEF_HELPER_2(mtc0_compare, void, env, tl)
goto cp0_unimplemented;
}
break;
- case CP0_REGISTER_09:
- switch (sel) {
- case CP0_REG09__SAAR:
- CP0_CHECK(ctx->saar);
- gen_helper_mfhc0_saar(arg, tcg_env);
- register_name = "SAAR";
- break;
- default:
- goto cp0_unimplemented;
- }
- break;
case CP0_REGISTER_17:
switch (sel) {
case CP0_REG17__LLADDR:
goto cp0_unimplemented;
}
break;
- case CP0_REGISTER_09:
- switch (sel) {
- case CP0_REG09__SAAR:
- CP0_CHECK(ctx->saar);
- gen_helper_mthc0_saar(tcg_env, arg);
- register_name = "SAAR";
- break;
- default:
- goto cp0_unimplemented;
- }
- break;
case CP0_REGISTER_17:
switch (sel) {
case CP0_REG17__LLADDR:
gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_SAARI));
register_name = "SAARI";
break;
- case CP0_REG09__SAAR:
- CP0_CHECK(ctx->saar);
- gen_helper_mfc0_saar(arg, tcg_env);
- register_name = "SAAR";
- break;
default:
goto cp0_unimplemented;
}
gen_helper_mtc0_saari(tcg_env, arg);
register_name = "SAARI";
break;
- case CP0_REG09__SAAR:
- CP0_CHECK(ctx->saar);
- gen_helper_mtc0_saar(tcg_env, arg);
- register_name = "SAAR";
- break;
default:
goto cp0_unimplemented;
}
gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_SAARI));
register_name = "SAARI";
break;
- case CP0_REG09__SAAR:
- CP0_CHECK(ctx->saar);
- gen_helper_dmfc0_saar(arg, tcg_env);
- register_name = "SAAR";
- break;
default:
goto cp0_unimplemented;
}
gen_helper_mtc0_saari(tcg_env, arg);
register_name = "SAARI";
break;
- case CP0_REG09__SAAR:
- CP0_CHECK(ctx->saar);
- gen_helper_mtc0_saar(tcg_env, arg);
- register_name = "SAAR";
- break;
default:
goto cp0_unimplemented;
}