For MIPS_EABI, squeeze simple floating point structs into an FP register.
authorAndrew Cagney <cagney@redhat.com>
Sat, 17 Jun 2000 14:33:56 +0000 (14:33 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 17 Jun 2000 14:33:56 +0000 (14:33 +0000)
gdb/ChangeLog
gdb/mips-tdep.c

index 38619e67d1da0cf919dc5acd0b3ccc4bef0712ee..39d557377801631b90ca77a0612d4696f4428cd0 100644 (file)
@@ -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>
index 94e96ca117ebef36b72be3e2f004b29d23ff395b..d14eaeac1ffbdbb6054353f4f2e57318e367b3c4 100644 (file)
@@ -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)
        {
This page took 0.040267 seconds and 4 git commands to generate.