[PATCH]: Expand finite() as inline i386 asm

Uros Bizjak ubizjak@gmail.com
Fri Feb 2 06:39:00 GMT 2007


On 2/1/07, Richard Henderson <rth@redhat.com> wrote:

> > BTW: I have done some measurements for different implementations, and
> > for targets without fucomi(p) insn, fxam is faster that fabs/fucompp
> > sequence.
>
> Good to know.  I suspect that ia64 will want to implement these
> operations with the special fclass instruction as well, so the
> optabs should probably stay around.

For x87, I have a feeling that compare with FLT_MAX (or DBL_MAX...) is
not a good approach due to inherent expanding of operand to 80 bit.
OTOH, fxam doesn't care about the width of operand.

> But please rename the optab to isfinite, rather than just finite.

Optab is now named "isinf" to follow c99 name.

Uros.



More information about the Gcc-patches mailing list