This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
i386-tdep.c -- returning fp values in fp regs.
- To: gdb at sourceware dot cygnus dot com
- Subject: i386-tdep.c -- returning fp values in fp regs.
- From: jtc at redback dot com (J.T. Conklin)
- Date: 21 Mar 2000 18:33:59 -0800
- Reply-To: jtc at redback dot com
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.
Thoughts?
--jtc
--
J.T. Conklin
RedBack Networks