Commit 4fb4e4b8 by Doug Evans

sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.

	* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
	* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
	(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
	(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
	(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
	(SPARC_FP_ARG_FIRST): New macro.
	(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
	(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
	(NPARM_REGS): There are 32 fp argument registers now.
	(FUNCTION_ARG_REGNO_P): Likewise.
	(FIRST_PARM_OFFSET): Update to new v9 abi.
	(REG_PARM_STACK_SPACE): Define for arch64.
	(enum sparc_arg_class): Delete.
	(sparc_arg_count,sparc_n_named_args): Delete.
	(struct sparc_args): Redefine and use for arch32 as well as arch64.
	(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
	(FUNCTION_ARG_ADVANCE): Rewrite.
	(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
	(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
	(FUNCTION_ARG_CALLEE_COPIES): Delete.
	(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
	(STRICT_ARGUMENT_NAMING): Define.
	(doublemove_string): Declare.
	* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
	(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
	(doublemove_string): New function.
	(output_move_quad): Clean up some of the arch64 support.
	(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
	Don't add 8 bytes of reserved space if arch64.
	(sparc_builtin_saveregs): Combine arch32/arch64 versions.
	(init_cumulative_args): New function.
	(function_arg_slotno): New static function.
	(function_arg,function_arg_partial_nregs): New functions.
	(function_arg_{pass_by_reference,advance}): New functions.
	(function_arg_padding): New function.
First pass at updating to current v9 abi.

From-SVN: r15968
parent 941b1165
/* Definitions of target machine for GNU compiler, for SPARC64, ELF.
Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Contributed by Doug Evans, dje@cygnus.com.
This file is part of GNU CC.
......@@ -19,7 +19,7 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This is a v9 only compiler. -mv8 is not expected to work. If you want
/* This is a v9 only compiler. -mcpu=v8 is not expected to work. If you want
a v8/v9 compiler, this isn't the place to do it. */
#define SPARC_V9 1 /* See sparc.h. */
......@@ -35,13 +35,15 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (sparc64-elf)")
/* A v9 compiler with stack-bias, 32 bit integers and 64 bit pointers,
in a Medium/Anywhere code model environment. */
/* A v9 compiler without stack-bias, lp64 sizes,
in a Medium/Anywhere code model environment.
There is no stack bias as this configuration is intended for
embedded systems. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT \
(MASK_V9 + MASK_ARCH64 + MASK_PTR64 + MASK_HARD_QUAD \
+ MASK_STACK_BIAS + MASK_MEDANY + MASK_APP_REGS + MASK_EPILOGUE + MASK_FPU)
(MASK_V9 + MASK_ARCH64 + MASK_PTR64 + MASK_LONG64 + MASK_HARD_QUAD \
MASK_MEDANY + MASK_APP_REGS + MASK_EPILOGUE + MASK_FPU)
/* __svr4__ is used by the C library */
/* ??? __arch64__ is subject to change. */
......@@ -120,6 +122,7 @@ crtbegin.o%s \
/* The medium/anywhere code model practically requires us to put jump tables
in the text section as gcc is unable to distinguish LABEL_REF's of jump
tables from other label refs (when we need to). */
/* ??? Revisit this. */
#undef JUMP_TABLES_IN_TEXT_SECTION
#define JUMP_TABLES_IN_TEXT_SECTION
......
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