qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] target-mips: Add missing calls to synchronise S


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] target-mips: Add missing calls to synchronise SoftFloat status
Date: Tue, 2 Dec 2014 17:19:06 +0000

On 2 December 2014 at 17:02, Maciej W. Rozycki <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]