diff options
author | Leon Alrae <leon.alrae@imgtec.com> | 2015-02-20 13:07:45 +0000 |
---|---|---|
committer | Leon Alrae <leon.alrae@imgtec.com> | 2015-03-11 14:13:57 +0000 |
commit | 644511117e7ca9f26d633a59c202a297113a796c (patch) | |
tree | 1a213779e8c4320e00ef6f24c0a49705aef1ac96 /target-mips/msa_helper.c | |
parent | 04cd79625fa4103c5839ba36ad476dd22f7f7557 (diff) |
target-mips: add missing MSACSR and restore fp_status and hflags
Save MSACSR state. Also remove fp_status, msa_fp_status, hflags and restore
them in post_load() from the architectural registers.
Float exception flags are not present in vmstate. Information they carry
is used only by softfloat caller who translates them into MIPS FCSR.Cause,
FCSR.Flags and then they are cleared. Therefore there is no need for saving
them in vmstate.
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-mips/msa_helper.c')
-rw-r--r-- | target-mips/msa_helper.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/target-mips/msa_helper.c b/target-mips/msa_helper.c index c2160a6a24..26ffdc726e 100644 --- a/target-mips/msa_helper.c +++ b/target-mips/msa_helper.c @@ -1348,17 +1348,7 @@ void helper_msa_ctcmsa(CPUMIPSState *env, target_ulong elm, uint32_t cd) break; case 1: env->active_tc.msacsr = (int32_t)elm & MSACSR_MASK; - /* set float_status rounding mode */ - set_float_rounding_mode( - ieee_rm[(env->active_tc.msacsr & MSACSR_RM_MASK) >> MSACSR_RM], - &env->active_tc.msa_fp_status); - /* set float_status flush modes */ - set_flush_to_zero( - (env->active_tc.msacsr & MSACSR_FS_MASK) != 0 ? 1 : 0, - &env->active_tc.msa_fp_status); - set_flush_inputs_to_zero( - (env->active_tc.msacsr & MSACSR_FS_MASK) != 0 ? 1 : 0, - &env->active_tc.msa_fp_status); + restore_msa_fp_status(env); /* check exception */ if ((GET_FP_ENABLE(env->active_tc.msacsr) | FP_UNIMPLEMENTED) & GET_FP_CAUSE(env->active_tc.msacsr)) { |