Message ID | 1463407965-19733-7-git-send-email-aleksandar.markovic@rt-rk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
> diff --git a/target-mips/translate.c b/target-mips/translate.c > index e934884..2cdd2bd 100644 > --- a/target-mips/translate.c > +++ b/target-mips/translate.c > @@ -20129,7 +20129,11 @@ void cpu_state_reset(CPUMIPSState *env) > env->CP0_PageGrain = env->cpu_model->CP0_PageGrain; > env->active_fpu.fcr0 = env->cpu_model->CP1_fcr0; > env->active_fpu.fcr31 = env->cpu_model->CP1_fcr31; > - set_snan_bit_is_one(1, &env->active_fpu.fp_status); > + if ((env->active_fpu.fcr31 >> FCR31_NAN2008) & 1) { > + set_snan_bit_is_one(0, &env->active_fpu.fp_status); > + } else { > + set_snan_bit_is_one(1, &env->active_fpu.fp_status); > + } This change is reverted in patch #9, perhaps it will be better to fold it into that patch? Thanks, Leon > env->msair = env->cpu_model->MSAIR; > env->insn_flags = env->cpu_model->insn_flags; > > diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c > index e81a831..a37d8bb 100644 > --- a/target-mips/translate_init.c > +++ b/target-mips/translate_init.c > @@ -893,5 +893,6 @@ static void msa_reset(CPUMIPSState *env) > /* clear float_status nan mode */ > set_default_nan_mode(0, &env->active_tc.msa_fp_status); > > - set_snan_bit_is_one(1, &env->active_tc.msa_fp_status); > + /* set proper signanling bit meaning ("1" means "quiet") */ > + set_snan_bit_is_one(0, &env->active_tc.msa_fp_status); > } > -- > 1.9.1 >
diff --git a/target-mips/translate.c b/target-mips/translate.c index e934884..2cdd2bd 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -20129,7 +20129,11 @@ void cpu_state_reset(CPUMIPSState *env) env->CP0_PageGrain = env->cpu_model->CP0_PageGrain; env->active_fpu.fcr0 = env->cpu_model->CP1_fcr0; env->active_fpu.fcr31 = env->cpu_model->CP1_fcr31; - set_snan_bit_is_one(1, &env->active_fpu.fp_status); + if ((env->active_fpu.fcr31 >> FCR31_NAN2008) & 1) { + set_snan_bit_is_one(0, &env->active_fpu.fp_status); + } else { + set_snan_bit_is_one(1, &env->active_fpu.fp_status); + } env->msair = env->cpu_model->MSAIR; env->insn_flags = env->cpu_model->insn_flags; diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c index e81a831..a37d8bb 100644 --- a/target-mips/translate_init.c +++ b/target-mips/translate_init.c @@ -893,5 +893,6 @@ static void msa_reset(CPUMIPSState *env) /* clear float_status nan mode */ set_default_nan_mode(0, &env->active_tc.msa_fp_status); - set_snan_bit_is_one(1, &env->active_tc.msa_fp_status); + /* set proper signanling bit meaning ("1" means "quiet") */ + set_snan_bit_is_one(0, &env->active_tc.msa_fp_status); }