]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(patches originally from Geoffrey Keating)
authorMichael Meissner <meissner@cygnus.com>
Wed, 26 Nov 1997 21:26:23 +0000 (21:26 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 26 Nov 1997 21:26:23 +0000 (14:26 -0700)
        (patches originally from Geoffrey Keating)
        * rs6000.c (function_arg): Excess floating point arguments don't
        go into GPR registers after exhausting FP registers under the
        System V.4 ABI.
        (function_arg_partial_nregs): Ditto.

        * rs6000.md (call insns): If -fPIC or -mrelocatable, add @plt
        suffix to calls.

From-SVN: r16758

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md

index 63bd24c862dcde888eb66e92afb144f8290ebdaa..d9e21f346938c435d4fc63bf711ff6990e9fb5ad 100644 (file)
@@ -1,3 +1,14 @@
+Wed Nov 26 13:04:46 1997  Michael Meissner  <meissner@cygnus.com>
+
+       (patches originally from Geoffrey Keating)
+       * rs6000.c (function_arg): Excess floating point arguments don't
+       go into GPR registers after exhausting FP registers under the
+       System V.4 ABI.
+       (function_arg_partial_nregs): Ditto.
+
+       * rs6000.md (call insns): If -fPIC or -mrelocatable, add @plt
+       suffix to calls.
+
 Wed Nov 26 13:04:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * toplev.c (main): Complain about -gdwarfn.
index 497aa3f352894f22370cf85d6e48dbf9e9aea269..1d44f59ebeb121f3074bf73174728f7624af20ca 100644 (file)
@@ -1349,9 +1349,11 @@ function_arg (cum, mode, type, named)
                                const0_rtx)));
     }
 
-  /* Long longs won't be split between register and stack */
+  /* Long longs won't be split between register and stack;
+     FP arguments get passed on the stack if they didn't get a register.  */
   else if ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS) &&
-          align_words + RS6000_ARG_SIZE (mode, type, named) > GP_ARG_NUM_REG)
+          (align_words + RS6000_ARG_SIZE (mode, type, named) > GP_ARG_NUM_REG
+           || (GET_MODE_CLASS (mode) == MODE_FLOAT && TARGET_HARD_FLOAT)))
     {
       return NULL_RTX;
     }
@@ -1385,6 +1387,9 @@ function_arg_partial_nregs (cum, mode, type, named)
        return 0;
     }
 
+  if (GET_MODE_CLASS (mode) == MODE_FLOAT && TARGET_HARD_FLOAT)
+    return 0;
+
   if (cum->words < GP_ARG_NUM_REG
       && GP_ARG_NUM_REG < (cum->words + RS6000_ARG_SIZE (mode, type, named)))
     {
index 42926563140cfbbf387498be595f5325fbe07c8f..4446e8570dc986b55d3505077b5626da635efe06 100644 (file)
   else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (flag_pic == 1) ? \"bl %z0@plt\" : \"bl %z0\";
+  return flag_pic ? \"bl %z0@plt\" : \"bl %z0\";
 }"
   [(set_attr "type" "branch")
    (set_attr "length" "4,8")])
   else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS)
     output_asm_insn (\"creqv 6,6,6\", operands);
 
-  return (flag_pic == 1) ? \"bl %z1@plt\" : \"bl %z1\";
+  return flag_pic ? \"bl %z1@plt\" : \"bl %z1\";
 }"
   [(set_attr "type" "branch")
    (set_attr "length" "4,8")])