Joseph,

>> -tp-bit.c: $(srcdir)/config/fp-bit.c
>> -    echo '#ifdef __MIPSEL__' > tp-bit.c
>> -    echo '# define FLOAT_BIT_ORDER_MISMATCH' >> tp-bit.c
>> -    echo '#endif' >> tp-bit.c
>> -    echo '#if __LDBL_MANT_DIG__ == 113' >> tp-bit.c
>> -    echo '#define QUIET_NAN_NEGATED' >> tp-bit.c
>> -    echo '# define TFLOAT' >> tp-bit.c
>> -    cat $(srcdir)/config/fp-bit.c >> tp-bit.c
>> -    echo '#endif' >> tp-bit.c
>
> How does your code replace the "#if __LDBL_MANT_DIG__ == 113" condition 
> that stops tp-bit.c being built for o32 multilibs that don't have TFmode?

Richard Sandiford already pointed this out in private mail.  My initial
analysis was based on the IRIX case, where long double has
__LDBL_MANT_DIG__ = 106 (ibm extended format), which is used for all
supported ABIs.  Unfortunately, I forgot that at least Linux/MIPS still
supports (or even defaults to) the O32 ABI, where double and long double
are both 64-bit.

> (The best way would I think be configure tests in libgcc that cause 
> tp-bit.c only to be built at all for the relevant multilibs for this 
> target.)

That's one option, which I currently prefer.

RX has a similar issue, where I sort of solved it like this

ifneq ($(filter -m64bit-doubles,$(INTERNAL_CFLAGS)),)
DPBIT = true
endif

but it seems this cannot reliably be done on mips.  I see two possible
solutions:

* Provide fpbit_wrap_start/fpbit_wrap_end as in soft-fp, which is a
  general solution.

* Use configure tests.  My current preference would be to use
  AC_CHECK_SIZEOF([double]) (for rx) and AC_CHECK_SIZEOF([long double])
  (for mips) and substitute ac_cv_sizeof_double/ac_cv_sizeof_long_double
  (perhaps * 8) as make variables to do the test above.

Preferences?

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to