On 2 December 2014 at 17:02, Maciej W. Rozycki <ma...@codesourcery.com> wrote: > Add missing calls to synchronise the SoftFloat status with the CP1.FSCR: > > + for the rounding and flush-to-zero modes upon processor reset, > > + for the flush-to-zero mode on FSCR updates through the GDB stub. > > Refactor code accordingly and remove the redundant RESTORE_ROUNDING_MODE > macro.
> @@ -95,7 +91,9 @@ int mips_cpu_gdb_write_register(CPUState > case 70: > env->active_fpu.fcr31 = tmp & 0xFF83FFFF; > /* set rounding mode */ > - RESTORE_ROUNDING_MODE; > + restore_rounding_mode(env); > + /* set flush-to-zero mode */ > + restore_flush_mode(env); > break; > @@ -19615,6 +19615,8 @@ void cpu_state_reset(CPUMIPSState *env) > } > > compute_hflags(env); > + restore_rounding_mode(env); > + restore_flush_mode(env); > cs->exception_index = EXCP_NONE; Is there ever a situation where you would want to resynchronise only one of these two things? If not, why not just have one function for synchronising softfloat state from the FCR? thanks -- PMM