Commit 1b5963f7 by Eric Botcazou Committed by Eric Botcazou

re PR target/12916 (No vector ABI)

	PR target/12916
	* config/sparc/sparc.h (NPARM_REGS): Delete.
	(BASE_RETURN_VALUE_REG): Likewise.
	(BASE_OUTGOING_VALUE_REG): Likewise.
	(BASE_PASSING_ARG_REG): Likewise.
	(BASE_INCOMING_ARG_REG): Likewise.
	* config/sparc/sparc.c (sparc_strict_argument_naming): Test
	TARGET_ARCH64, not TARGET_V9.
	(function_arg_slotno): Dispatch based on the mode class.
	Handle vector modes like floating-point modes.
	(function_arg_record_value_1): Handle vector types like
	floating-point types.
	(function_arg_record_value_2): Likewise.
	Calculate regno after mode transformation.
	(function_arg): Handle vector modes like floating-point modes.
	(function_arg_partial_nregs): Replace NPARM_REGS by SPARC_INT_ARG_MAX.
	If ARCH64, do not recheck alignment.
	(function_arg_pass_by_reference): Reorder the conditions.
	(sparc_return_in_memory): Move after function_arg_padding.
	Implement calling conventions for vector modes.
	(sparc_struct_value_rtx): Move after sparc_return_in_memory.
	(function_value): Move scope of 'regbase'.
	Implement calling conventions for vector modes.
	(sparc_builtin_saveregs): Replace NPARM_REGS by SPARC_INT_ARG_MAX
	and BASE_INCOMING_ARG_REG by SPARC_INCOMING_INT_ARG_FIRST.
	(sparc_va_arg): Use function_arg_pass_by_reference to test whether
	the argument is passed by reference.
	(sparc_type_code): Handle vector types.

From-SVN: r78087
parent 19037b5c
2004-02-19 Eric Botcazou <ebotcazou@libertysurf.fr>
PR target/12916
* config/sparc/sparc.h (NPARM_REGS): Delete.
(BASE_RETURN_VALUE_REG): Likewise.
(BASE_OUTGOING_VALUE_REG): Likewise.
(BASE_PASSING_ARG_REG): Likewise.
(BASE_INCOMING_ARG_REG): Likewise.
* config/sparc/sparc.c (sparc_strict_argument_naming): Test
TARGET_ARCH64, not TARGET_V9.
(function_arg_slotno): Dispatch based on the mode class.
Handle vector modes like floating-point modes.
(function_arg_record_value_1): Handle vector types like
floating-point types.
(function_arg_record_value_2): Likewise.
Calculate regno after mode transformation.
(function_arg): Handle vector modes like floating-point modes.
(function_arg_partial_nregs): Replace NPARM_REGS by SPARC_INT_ARG_MAX.
If ARCH64, do not recheck alignment.
(function_arg_pass_by_reference): Reorder the conditions.
(sparc_return_in_memory): Move after function_arg_padding.
Implement calling conventions for vector modes.
(sparc_struct_value_rtx): Move after sparc_return_in_memory.
(function_value): Move scope of 'regbase'.
Implement calling conventions for vector modes.
(sparc_builtin_saveregs): Replace NPARM_REGS by SPARC_INT_ARG_MAX
and BASE_INCOMING_ARG_REG by SPARC_INCOMING_INT_ARG_FIRST.
(sparc_va_arg): Use function_arg_pass_by_reference to test whether
the argument is passed by reference.
(sparc_type_code): Handle vector types.
2004-02-19 Alan Modra <amodra@bigpond.net.au>
* function.c (assign_parms): When building decl_rtl for
......
......@@ -1467,17 +1467,6 @@ extern char leaf_reg_remap[];
/* Stack layout; function entry, exit and calling. */
/* Define the number of register that can hold parameters.
This macro is only used in other macro definitions below and in sparc.c.
MODE is the mode of the argument.
!v9: All args are passed in %o0-%o5.
v9: %o0-%o5 and %f0-%f31 are cumulatively used to pass values.
See the description in sparc.c. */
#define NPARM_REGS(MODE) \
(TARGET_ARCH64 \
? (GET_MODE_CLASS (MODE) == MODE_FLOAT ? 32 : 6) \
: 6)
/* Define this if pushing a word on the stack
makes the stack pointer a smaller address. */
#define STACK_GROWS_DOWNWARD
......@@ -1565,22 +1554,6 @@ extern char leaf_reg_remap[];
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
/* Some subroutine macros specific to this machine.
When !TARGET_FPU, put float return values in the general registers,
since we don't have any fp registers. */
#define BASE_RETURN_VALUE_REG(MODE) \
(TARGET_FPU && FLOAT_MODE_P (MODE) ? 32 : 8)
#define BASE_OUTGOING_VALUE_REG(MODE) \
(TARGET_FPU && FLOAT_MODE_P (MODE) ? 32 : 24)
#define BASE_PASSING_ARG_REG(MODE) \
(TARGET_ARCH64 && TARGET_FPU && FLOAT_MODE_P (MODE) ? 32 : 8)
/* ??? FIXME -- seems wrong for v9 structure passing... */
#define BASE_INCOMING_ARG_REG(MODE) \
(TARGET_ARCH64 && TARGET_FPU && FLOAT_MODE_P (MODE) ? 32 : 24)
/* Define this macro if the target machine has "register windows". This
C expression returns the register number as seen by the called function
corresponding to register number OUT as seen by the calling function.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment