From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Andreas Schwab Cc: gdb-patches@sources.redhat.com Subject: Re: Long double support on m68k Date: Tue, 24 Jul 2001 15:12:00 -0000 Message-id: <3B5DF2C3.6030609@cygnus.com> References: <3B5D8DEA.1040300@cygnus.com> X-SW-Source: 2001-07/msg00609.html > Andrew Cagney writes: > > |> > This patch enables long double support for m68k. > |> > Andreas. > |> > 2001-07-23 Andreas Schwab > |> > * config/m68k/tm-m68k.h (TARGET_LONG_DOUBLE_FORMAT): Define. > |> > (TARGET_LONG_DOUBLE_BIT): Define. > |> > (REGISTER_VIRTUAL_SIZE): Return 12 for floating point registers. > |> > (MAX_REGISTER_VIRTUAL_SIZE): Increase to 12. > |> > (REGISTER_VIRTUAL_TYPE): Return builtin_type_long_double for > |> > floating point registers. > |> > (REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL, > |> > REGISTER_CONVERT_TO_RAW): Remove. > |> > * config/m68k/xm-linux.h (HOST_LONG_DOUBLE_FORMAT): Define. > |> |> |> The patch changes something included by all the other config/m68k/tm-*.h > |> header files. Can you explain why it won't break some of those targets. > > Well, that's how the m68k looks like on all targets (if they support > floating point at all). All targets that make use of the fpu do it > similar as m68k-linux and don't touch any of the macros I changed, so I > think this should be safe. The patch only changes the representation of > floating point values at gdb's point of view, not how the target is using > it. So, what you're saying is that: o only tm-m68k defines the current REGISTER_CONVERT* macros. All m68k targets import/use this. o the existing REGISTER_CONVERT* macro's only work when the raw register buffer is laid out using a specific format. o A target's FP only works when the target has a raw register buffer that correctly matches REGISTER_CONVERT* o If a target has somehow managed to get a raw register buffer that doesn't match REGISTER_CONVERT* then, even before this change, it is broken. So, if a target's raw FP registers are in the correct format for REGISTER_CONVERT* then they are also in the correct format for this change and such targets will continue to work. If a target's raw FP registers were not in the correct format then, that target is already broken and this change doesn't make things better or worse. Correct? Andrew