This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] libm additions and corrections, 1 of 2


     Even when long double routines are actually added, remapping when
long double is equivalent to double is a desirable thing to me because
it
saves code space.  Why have an identical function (redundant code,
wastes
space) or a wrapper (lose a tiny bit of efficiency; as is done when
double
is 32 bits) when it is possible to go straight to what you want?
     The only shortcoming with this specific method is that it is not a
full solution, only working when GCC is used.  (If only GCC is ever used
with Newlib, then it is 100%, but it does not seem to be a requirement.)
				Craig 

-----Original Message-----
From: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org]
On Behalf Of Ken Werner
Sent: Thursday, March 19, 2009 10:32 AM
To: newlib@sourceware.org; Schwarz, Konrad; Howland Craig D (Craig)
Subject: Re: [PATCH] libm additions and corrections, 1 of 2

On Thursday 19 March 2009 14:22:55 Schwarz, Konrad wrote:
> > Hi,
> > I'm willing to rebase my patch if yours gets applied first.
> > Are there any
> > objections in general regarding mapping the long double
> > functions to their
> > counterparts on platforms where a double equals the long double
> > (http://sourceware.org/ml/newlib/2009/msg00244.html)?
>
> One thing that is required for ANSI conformance is that library
versions
> are available as well.  I don't remember if your patch had this
feature.

The patch does not provide an implementation of the C99 long double
functions 
but their prototypes. It was intended to improve portability of existent
code 
without implementing new routines in newlib. If the users code calls a
long 
double function the generated assembler code will reference the double 
equivalent. The mechanism is described in GCCs info page 5.36
"Controlling 
Names Used in Assembler Code". In fact the code links against the double

counterpart. In case the width of a long double changes in the future
(such 
things happened), formerly compiled code would still use the double
routines.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]