Subject: Re: -msoft-quad-float and sparc64
To: None <abs@netbsd.org, tv@wasabisystems.com>
From: None <eeh@netbsd.org>
List: port-sparc64
Date: 10/24/2001 00:01:22
| On Tue, 23 Oct 2001, David Brownlee wrote:
|
| : 	Is this lossage likely to show up in arbitrary third party
| : 	software? Should -msoft-quad-float be the default on sparc64
| : 	until its fixed in gcc?
|
| There is an issue with missing support functions for some operations with
| -msoft-quad-float (as told to me by eeh), but I'm not sure what yet.  He
| said that otherwise, the ABI is compatible with "native" long doubles.
|
| It could be just some extra libgcc support that would need to be pulled in;
| I am researching it.  If this is possible, I do intend to turn on
| -msoft-quad-float by default on sparc64.

To be specific, you need to implement the following routines in libc as defined
by the ELF processor-specific ABI:

/* Define library calls for quad FP operations.  These are all part of the
   SPARC ABI.
   ??? ARCH64 still does not work as the _Qp_* routines take pointers.  */
#define ADDTF3_LIBCALL (TARGET_ARCH64 ? "_Qp_add" : "_Q_add")
#define SUBTF3_LIBCALL (TARGET_ARCH64 ? "_Qp_sub" : "_Q_sub")
#define NEGTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_neg" : "_Q_neg")
#define MULTF3_LIBCALL (TARGET_ARCH64 ? "_Qp_mul" : "_Q_mul")
#define DIVTF3_LIBCALL (TARGET_ARCH64 ? "_Qp_div" : "_Q_div")
#define FLOATSITF2_LIBCALL (TARGET_ARCH64 ? "_Qp_itoq" : "_Q_itoq")
#define FIX_TRUNCTFSI2_LIBCALL (TARGET_ARCH64 ? "_Qp_qtoi" : "_Q_qtoi")
#define FIXUNS_TRUNCTFSI2_LIBCALL (TARGET_ARCH64 ? "_Qp_qtoui" : "_Q_qtou")
#define EXTENDSFTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_stoq" : "_Q_stoq")
#define TRUNCTFSF2_LIBCALL (TARGET_ARCH64 ? "_Qp_qtos" :  "_Q_qtos")
#define EXTENDDFTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_dtoq" : "_Q_dtoq")
#define TRUNCTFDF2_LIBCALL (TARGET_ARCH64 ? "_Qp_qtod" : "_Q_qtod")
#define EQTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_feq" : "_Q_feq")
#define NETF2_LIBCALL (TARGET_ARCH64 ? "_Qp_fne" : "_Q_fne")
#define GTTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_fgt" : "_Q_fgt")
#define GETF2_LIBCALL (TARGET_ARCH64 ? "_Qp_fge" : "_Q_fge")
#define LTTF2_LIBCALL (TARGET_ARCH64 ? "_Qp_flt" : "_Q_flt")
#define LETF2_LIBCALL (TARGET_ARCH64 ? "_Qp_fle" : "_Q_fle")

Eduardo