Sorry, sent an incomplete email. it was missing this part:

On Thu, Nov 25, 2021 at 03:12:32PM -0600, Segher Boessenkool wrote:
> > +;; int fegetround(void)
> > +;;
> > +;; This expansion for the C99 function only expands for compatible
> > +;; target libcs. Because it needs to return one of FE_DOWNWARD,
> > +;; FE_TONEAREST, FE_TOWARDZERO or FE_UPWARD with the values as defined
> > +;; by the target libc, and since they are free to
> > +;; choose the values and the expand needs to know then beforehand,
> > +;; this expand only expands for target libcs that it can handle the
> > +;; values is knows.
> > +;; Because of these restriction, this only expands on the desired
> > +;; case and fallback to a call to libc on any otherwise.
> > +(define_expand "fegetroundsi"
> 
> (This needs some wordsmithing.)

How about something like this? It is just a light editing of the above:

;; This expansion for the C99 function only expands for compatible
;; target libcs, because it needs to return one of FE_DOWNWARD,
;; FE_TONEAREST, FE_TOWARDZERO or FE_UPWARD with the values as defined
;; by the target libc, and since the libc is free to choose the values
;; (and they may differ from the hardware) and the expander needs to
;; know then beforehand, this expanded only expands for target libcs
;; that it can handle the values is knows.
;; Because of these restriction, this only expands on the desired
;; case and fallback to a call to libc otherwise.


o/
Raoni

Reply via email to