This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


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

Re: Unifying the x86 FPU register sets



> Keep in mind that the goal is not to eliminate tm-go32.h and the
> others; I expect each target will always need to make some tweaks to
> the base definition provided by tm-i386.h.
> 
> (Does that answer the question?  Not sure...)

Yes, it does, for me at least.  Thanks.

> The tm-linux.h header does this now --- look for LD_I387.
> 
> Perhaps the ideal solution would be for configure to determine which
> floating-point formats the host supports, and #define some symbol like
> HOST_X86_EXTENDED_REAL_TYPE.  Then, tm-i386.h could use that as the
> virtual type for FPU registers.
> 
> But this is an issue which can be dealt with separately.  For now, I
> think it's fine for the more specific i386/tm-*.h files to override
> REGISTER_VIRTUAL_TYPE in order to get the full precision.

How about agreeing that every x86 platform uses LD_I387 to signal
support for long double in this context, and then modify tm-i386.h to
convert the FP registers to long double values?  Then all that's left
is to arrange for configure to define or undefine LD_I387.  Until
configure does that, the platform-specific tm-* files will only have
to define LD_I387.

> If REGISTER_CONVERTIBLE(i) is zero, you should never call
> REGISTER_CONVERT_TO_VIRTUAL or REGISTER_CONVERT_TO_RAW on the value of
> that register.  I see that go32-nat.c does this, but that's incorrect.

If go32-nat.c is the only one that does that, then I'll correct it.

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