aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mips-tdep.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 38619e6..39d5573 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jun 18 00:27:15 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips-tdep.c (mips_push_arguments): For MIPS_EABI, squeeze a
+ strut containing a floating-point into an FP register.
+
Sat Jun 17 16:00:56 2000 Andrew Cagney <cagney@b1.cygnus.com>
* remote-mips.c: Include <ctype.h>
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 94e96ca..d14eaea 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -2143,7 +2143,14 @@ mips_push_arguments (nargs, args, sp, struct_return, struct_addr)
don't use float registers for arguments. This duplication of
arguments in general registers can't hurt non-MIPS16 functions
because those registers are normally skipped. */
- if (typecode == TYPE_CODE_FLT
+ /* MIPS_EABI squeeses a struct that contains a single floating
+ point value into an FP register instead of pusing it onto the
+ stack. */
+ if ((typecode == TYPE_CODE_FLT
+ || (MIPS_EABI
+ && (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)
+ && TYPE_NFIELDS (arg_type) == 1
+ && TYPE_CODE (TYPE_FIELD_TYPE (arg_type, 0)) == TYPE_CODE_FLT))
&& float_argreg <= MIPS_LAST_FP_ARG_REGNUM
&& MIPS_FPU_TYPE != MIPS_FPU_NONE)
{