Re: [SPARC] Fix PR target/59316

2013-12-05 Thread Eric Botcazou
> Generically, each iteration of the compare-and-exchange loop should be as > if the previous iterations hadn't happened, so restoring all the previous > FP state is right in that sense. I see. > With regard to the implementation, the insn patterns for the SPARC > builtins should specify that the

Re: [SPARC] Fix PR target/59316

2013-12-05 Thread Joseph S. Myers
On Thu, 5 Dec 2013, Eric Botcazou wrote: > > 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

Re: [SPARC] Fix PR target/59316

2013-12-05 Thread Eric Botcazou
> 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

Re: [SPARC] Fix PR target/59316

2013-12-05 Thread Joseph S. Myers
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 t