This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: i386-tdep.c -- returning fp values in fp regs.
- To: jtc at redback dot com
- Subject: Re: i386-tdep.c -- returning fp values in fp regs.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 22 Mar 2000 14:12:41 +1100
- CC: gdb at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <5msnxjg2co.fsf@jtc.redbacknetworks.com>
"J.T. Conklin" wrote:
>
> In i386-tdep.c, the code that enables extracting floating point values
> from floating point registers is wrapped with the conditional:
>
> /* On AIX, i386 GNU/Linux and DJGPP, floating point values are
> returned in floating point registers. */
> /* FIXME: cagney/2000-02-29: This function needs to be rewritten
> using multi-arch. Please don't keep adding to this #ifdef
> spaghetti. */
>
> #if defined(I386_AIX_TARGET) || defined(I386_GNULINUX_TARGET) || \
> defined(I386_DJGPP_TARGET)
>
> I need to enable this code for NetBSD/i386, but judging from Andrew's
> comment, adding I386_NETBSD_TARGET woudn't go over very well :-). Is
> there any way we can fix this up short of gdbarching the i386 port?
>
> As far as I can tell, I386_AIX_TARGET and I386_DJGPP_TARGET are only
> defined in their respective target headers so they can be used by this
> conditional. I386_GNULINUX_TARGET is only used by this and gdbserver.
>
> This leads me to conclude that we can remove the I386_AIX_TARGET and
> I386_DJGPP_TARGET macros and replace them with a new macro. The GNU/
> Linux port would define it in addition to I386_GNULINUX_TARGET. I'm
> not good with names, the best I can come up with is I386_RETURNS_FP-
> _IN_FP_REGS or some such.
My only suggestion is to call it
``DEPRECATED_I386_RETURNS_FP_IN_FP_REGS''.
Andrew