On Thu, 5 Dec 2013, Eric Botcazou wrote:

> +  /* We generate the equivalent of feclearexcept (FE_ALL_EXCEPT):
> +
> +       unsigned int tmp2_var;
> +       __builtin_store_fsr (&tmp2_var);
> +
> +       tmp2_var &= ~accrued_exception_mask;
> +
> +       __builtin_load_fsr (&tmp2_var);  */

Note that you could probably just reload the tmp1_var value rather than 
needing to store the fsr value again to clear exceptions from it, unless 
there's an architecture-specific reason the tmp1_var value might no longer 
be the right value to load to clear exceptions.  (This is what x86 does 
for SSE state, loading the same value for exceptions-cleared SSE state 
every iteration of the loop.)

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to