/* 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;
/* 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");
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)
/* 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;
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;
}
}
- 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)
#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"
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, \
#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. */
? (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
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
)