*** empty log message ***
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 27 May 1992 21:52:26 +0000 (14:52 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 27 May 1992 21:52:26 +0000 (14:52 -0700)
From-SVN: r1103

gcc/config/i960/i960.c
gcc/config/sparc/sparc.h
gcc/function.c

index 50341ed36b50041ce50504751ffe7b7cb62220d5..0a633665c41343530dc300cac3091182aa571e06 100644 (file)
@@ -809,7 +809,7 @@ i960_function_name_declare (file, name, fndecl)
   /* Even if nobody uses extra parms, can't have leafroc or tail calls if
      argblock, because argblock uses g14 implicitly.  */
 
-  if (current_function_args_size > 48)
+  if (current_function_args_size != 0)
     {
       tail_call_ok = 0;
       leaf_proc_ok = 0;
@@ -1165,7 +1165,7 @@ i960_function_epilogue (file, size)
 
   /* Must clear g14 on return.  */
 
-  if (current_function_args_size > 48)
+  if (current_function_args_size != 0)
     fprintf (file, "\tmov      0,g14\n");
 
   fprintf (file, "\tret\n");
@@ -1221,7 +1221,7 @@ i960_output_ret_insn (insn)
       return lbuf;
     }
 
-  if (current_function_args_size > 48)
+  if (current_function_args_size != 0)
     output_asm_insn ("mov      0,g14", 0);
 
   if (i960_leaf_ret_reg >= 0)
@@ -2135,7 +2135,7 @@ i960_reg_parm_stack_space (fndecl)
 
   /* Otherwise, we have an arg block if the current function has more than
      48 bytes of parameters.  */
-  if (current_function_args_size > 48)
+  if (current_function_args_size != 0)
     return 48;
   else
     return 0;
@@ -2195,7 +2195,7 @@ i960_expand_call (first_operand, second_operand, target)
         function call.  If the current function has no argument block,
         then g14 is zero before and after the call.  */
 
-      if (current_function_args_size > 48)
+      if (current_function_args_size != 0)
        {
          start_sequence ();
          seq_stack = sequence_stack;
@@ -2209,7 +2209,7 @@ i960_expand_call (first_operand, second_operand, target)
        }
     }
 
-  if (current_function_args_size > 48)
+  if (current_function_args_size != 0)
     frob_g14 = 1;
 
   if (GET_CODE (second_operand) != CONST_INT || INTVAL (second_operand) > 48)
index 6b9c8cb95b521da3f860eedd352b7106f0cdb34e..3e69891f288e7211ed40187c2838c7077a1048ae 100644 (file)
@@ -38,6 +38,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #define CC1_SPEC "%{sun4:} %{target:}"
 
+#if 0
+/* Sparc ABI says that long double is 4 words.
+   ??? This doesn't work yet.  */
+#define LONG_DOUBLE_TYPE_SIZE 128
+#endif
+
 #define PTRDIFF_TYPE "int"
 #define SIZE_TYPE "int"
 #define WCHAR_TYPE "short unsigned int"
@@ -239,11 +245,10 @@ extern int target_flags;
    and are not available for the register allocator.
    0 is used for the condition code and not to represent %g0, which is
    hardwired to 0, so reg 0 is *not* fixed.
-   2 and 3 are free to use as temporaries.
-   4 through 7 are expected to become usefully defined in the future.
-   Your milage may vary.  */
+   g1 through g4 are free to use as temporaries.
+   g5 through g7 are reserved for the operating system.  */
 #define FIXED_REGISTERS  \
- {0, 0, 0, 0, 1, 1, 1, 1,      \
+ {0, 0, 0, 0, 0, 1, 1, 1,      \
   0, 0, 0, 0, 0, 0, 1, 0,      \
   0, 0, 0, 0, 0, 0, 0, 0,      \
   0, 0, 0, 0, 0, 0, 1, 1,      \
@@ -361,6 +366,12 @@ extern int leaf_function;
 #define INITIALIZE_PIC initialize_pic ()
 #define FINALIZE_PIC finalize_pic ()
 
+/* Sparc ABI says that quad-precision floats and all structures are returned
+   in memory.  */
+#define RETURN_IN_MEMORY(TYPE) \
+  (TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE (TYPE) == UNION_TYPE   \
+   || TYPE_MODE (TYPE) == TFmode)
+
 /* Functions which return large structures get the address
    to place the wanted value at offset 64 from the frame.
    Must reserve 64 bytes for the in and local registers.  */
@@ -726,10 +737,12 @@ extern char leaf_reg_backmap[];
    ? (NPARM_REGS - ROUND_REG ((CUM), (MODE)))                          \
    : 0)
 
-/* The SPARC ABI stipulates passing struct arguments (of any size)
-   by invisible reference.  */
+/* The SPARC ABI stipulates passing struct arguments (of any size) and
+   quad-precision floats by invisible reference.  */
 #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED)         \
-  (TYPE && (TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE (TYPE) == UNION_TYPE))
+  ((TYPE && (TREE_CODE (TYPE) == RECORD_TYPE                           \
+           || TREE_CODE (TYPE) == UNION_TYPE))                         \
+   || (MODE == TFmode))
 
 /* If defined, a C expression that gives the alignment boundary, in
    bits, of an argument with the specified mode and type.  If it is
index f5218e04d9636cab29d2ff6627e27ad899bbf64b..11070e0acc702e5a5293f62c06c8ac40914dc66d 100644 (file)
@@ -2686,9 +2686,16 @@ assign_parms (fndecl, second_time)
         to indicate there is no preallocated stack slot for the parm.  */
 
       if (entry_parm == stack_parm
-#ifdef REG_PARM_STACK_SPACE
+#if defined (REG_PARM_STACK_SPACE) && ! defined (MAYBE_REG_PARM_STACK_SPACE)
          /* On some machines, even if a parm value arrives in a register
-            there is still an (uninitialized) stack slot allocated for it.  */
+            there is still an (uninitialized) stack slot allocated for it.
+
+            ??? When MAYBE_REG_PARM_STACK_SPACE is defined, we can't tell
+            whether this parameter already has a stack slot allocated,
+            because an arg block exists only if current_function_args_size
+            is larger than some threshhold, and we haven't calculated that
+            yet.  So, for now, we just assume that stack slots never exist
+            in this case.  */
          || REG_PARM_STACK_SPACE (fndecl) > 0
 #endif
          )