pa.c (function_arg): Pass floating arguments in both general and floating registers...
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>
Mon, 24 Sep 2001 16:16:07 +0000 (16:16 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Mon, 24 Sep 2001 16:16:07 +0000 (16:16 +0000)
* pa.c (function_arg): Pass floating arguments in both general and
floating registers in indirect (dynamic) calls when generating code
for the 32 bit ABI and the HP assembler.

From-SVN: r45775

gcc/ChangeLog
gcc/config/pa/pa.c

index a8f403fd71f68bd826b0a164de90621f06f37735..172e5c97a8fe2fb6a3507fab69c589ff04909aa6 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-24  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * pa.c (function_arg): Pass floating arguments in both general and
+       floating registers in indirect (dynamic) calls when generating code
+       for the 32 bit ABI and the HP assembler.
+
 2001-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        * doc/install.texi: Markup fixes.
index 0bc2c8fa6515e3e5dfa8849879ea58f3a5fc124e..6ce61a8650cd2a56e2f7d3eb6e1d089c385c4ff2 100644 (file)
@@ -7145,22 +7145,30 @@ function_arg (cum, mode, type, named, incoming)
                                         gen_rtx_REG (DImode, gpr_reg_base),
                                         GEN_INT (8))));
     }
-  /* Determine if the register needs to be passed in both general and
+  /* Determine if the argument needs to be passed in both general and
      floating point registers.  */
-  if ((TARGET_PORTABLE_RUNTIME || TARGET_64BIT || TARGET_ELF32)
-      /* If we are doing soft-float with portable runtime, then there
-        is no need to worry about FP regs.  */
-      && ! TARGET_SOFT_FLOAT
-      /* The parameter must be some kind of float, else we can just
-        pass it in integer registers.  */
-      && FLOAT_MODE_P (mode)
-      /* The target function must not have a prototype.  */
-      && cum->nargs_prototype <= 0
-      /* libcalls do not need to pass items in both FP and general
-        registers.  */
-      && type != NULL_TREE
-      /* All this hair applies to outgoing args only.  */
-      && !incoming)
+  if (((TARGET_PORTABLE_RUNTIME || TARGET_64BIT || TARGET_ELF32)
+       /* If we are doing soft-float with portable runtime, then there
+         is no need to worry about FP regs.  */
+       && ! TARGET_SOFT_FLOAT
+       /* The parameter must be some kind of float, else we can just
+         pass it in integer registers.  */
+       && FLOAT_MODE_P (mode)
+       /* The target function must not have a prototype.  */
+       && cum->nargs_prototype <= 0
+       /* libcalls do not need to pass items in both FP and general
+         registers.  */
+       && type != NULL_TREE
+       /* All this hair applies to outgoing args only.  */
+       && ! incoming)
+      /* Also pass outgoing floating arguments in both registers in indirect
+        calls with the 32 bit ABI and the HP assembler since there is no
+        way to the specify argument locations in static functions.  */
+      || (! TARGET_64BIT
+         && ! TARGET_GAS
+         && ! incoming
+         && cum->indirect
+         && FLOAT_MODE_P (mode)))
     {
       retval
        = gen_rtx_PARALLEL