Re: [rfc] alpha-linux changing to 128-bit long double
On Sat, Mar 13, 2004 at 09:08:06AM +0100, Jakub Jelinek wrote:
> On the other side, Alpha is not the only arch which want long double
> and changing SONAME is really painful.
I was noticing this.
> was my initial attempt to handle this (even including support for
> compilation with 64bit or 128bit long double), it just did not handle
> *printf/*scanf, but I wrote in there how could that be solved.
My thought for handling printf/scanf was to do something like
#define DOUBLE_LDOUBLE_SAME_P (sizeof(double) == sizeof(long double))
extern __thread int __libc_double_ldouble_same;
#define DOUBLE_LDOUBLE_SAME_P __libc_double_ldouble_same
and then use that like so:
if (!DOUBLE_LDOUBLE_SAME_P && (flags & LONGDBL))
long double d = ...
else if (flags & (LONGDBL | LONG))
double d = ...
which would even save a teeny bit of code for those targets that
do not plan to change to have different sized doubles. vfprintf
is somewhat more complex, since there are at least three places
where we look at va_arg, but otherwise conceptually the same.
The tls variable would get set properly by the actual user-visible
entry points. That seemed slightly easier than passing this down
as a conditionalized parameter to the internal function.
> I can revive this patch, finish it and it could be then used on
That would be cool.