This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: support of 128 bit long real on linux for ia32



> On x86-64 the ABI has both long double and float128 and they're both
> sizeof()==16. This problem has not yet been solved - float128 and int128
> are optional in the ABI so we haven't thought much about it yet.

There is a similar problem with Alpha and Convex, on which the 64-bit
double could be either IEEE or VAX data structure.  In order to
support either format optionally at run time, I think you would need to
make TARGET_FLOAT_FORMAT be a run-time variable instead of a compile-time
macro.  It is a possible but very messy change, and I don't know that
there has ever been any significant customer demand for it.  To the extent
that gcc determines the mode just by looking at the width of the type,
that change would still not allow you to mix the two data structures
in the same source file, but at least a command line switch like
-mvax or -mieee could work then.

If you want both a 96-bit wide type and a 128-bit type, however, that is a
less massive change and I think it could be supported by defining the C
type long long double, for example.  I do not think that simply declaring
something to be TFmode will work, because there are some things that
depend on LONG_DOUBLE_TYPE_SIZE  which is not a variable but a macro.
Consequently the width of a REAL_VALUE_TYPE might not be sufficient to handle
TFmode values.  So either way of doing it entails some labor.


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