From: Jim Wilson Date: Wed, 27 May 1992 21:52:26 +0000 (-0700) Subject: *** empty log message *** X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9ca49d580e2cba9bce7c1b5aba24bdfc55d874d;p=gcc.git *** empty log message *** From-SVN: r1103 --- diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c index 50341ed36b5..0a633665c41 100644 --- a/gcc/config/i960/i960.c +++ b/gcc/config/i960/i960.c @@ -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) diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 6b9c8cb95b5..3e69891f288 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -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 diff --git a/gcc/function.c b/gcc/function.c index f5218e04d96..11070e0acc7 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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 )