This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: PR target/15383: __float128 function name is used forlong double
H. J. Lu wrote:
The HP interface has some additional functions. This patch changes
the common subset of TFmode functions with the HPUX conventions.
The patch looks mostly reasonable to me.
ia64_sysv4_init_libfuncs is missing an explanatory comment.
The comment inside this function is confusing.
+ /* HPUX doesn't use them. */
I think this should be something like
/* These functions are not part of the HPUX TFmode interface. We use
them instead of _U_Qfcmp, which doesn't work the way we expect. */
Why didn't you put fmin, fmax, and fabs in the common
ia64_init_libfuncs? They should be usable for linux. Is this just a
matter of glibc not having them? If so, then perhaps a comment here
would be uesful to point that out.
Zack mentioned ia64_expand_compare. It isn't clear if you looked at it.
/* HPUX TFmode compare requires a library call to _U_Qfcmp, which takes a
magic number as its third argument, that indicates what to do.
The return value is an integer to be compared against zero. */
else if (TARGET_HPUX && GET_MODE (op0) == TFmode)
I think this would be clearer if it was changed to check cmptf_libcall
instead of TARGET_HPUX. That makes the connection between
ia64_hpux_init_libfuncs a direct connection, instead of an indirect
connection via TARGET_HPUX. It might also be useful to add an abort for
the case where GET_MODE (op) == TFmode and cmptf_libcall is not set. In
that case, we would fall through and generate an unrecognizable insn.
It is perhaps better to abort, or give a suitable error, than to
generate an unrecognizable insn. We should never reach here with TFmode
if eq_optab etc are set.
Your set of comparisons by the way is incomplete. There is also
unord_optab. This matters for FP comparisons like ordered, unordered,
uneq, unge, ungt, unle, unlt, and ltgt.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com