diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-01-26 18:17:58 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-01-26 18:17:58 +0000 |
commit | 04e9daaf31d67f5b16b7c70013975536139ebf5f (patch) | |
tree | 69651798ae472045b7e42f816c119273147adf8a /gcc | |
parent | b2037eac294895d135551d4ffae674c3a4d637a2 (diff) | |
download | gcc-04e9daaf31d67f5b16b7c70013975536139ebf5f.zip gcc-04e9daaf31d67f5b16b7c70013975536139ebf5f.tar.gz gcc-04e9daaf31d67f5b16b7c70013975536139ebf5f.tar.bz2 |
pdp11.c (TARGET_STRUCT_VALUE_RTX): New.
* config/pdp11/pdp11.c (TARGET_STRUCT_VALUE_RTX): New.
(TARGET_RETURN_IN_MEMORY): Likewise.
* config/pdp11/pdp11.h (STRUCT_VALUE): Remove.
(RETURN_IN_MEMORY): Likewise.
From-SVN: r76654
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/pdp11/pdp11.c | 21 | ||||
-rw-r--r-- | gcc/config/pdp11/pdp11.h | 21 |
3 files changed, 28 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 65f5704..566d6ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-01-26 Kazu Hirata <kazu@cs.umass.edu> + + * config/pdp11/pdp11.c (TARGET_STRUCT_VALUE_RTX): New. + (TARGET_RETURN_IN_MEMORY): Likewise. + * config/pdp11/pdp11.h (STRUCT_VALUE): Remove. + (RETURN_IN_MEMORY): Likewise. + 2004-01-26 Fariborz Jahanian <fjahanian@apple.com> * config/rs6000/rs6000.c (rs6000_emit_move): split slow diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index 049b541..1175109 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -1,5 +1,5 @@ /* Subroutines for gcc2 for pdp11. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2004 Free Software Foundation, Inc. Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). @@ -60,6 +60,7 @@ static bool pdp11_assemble_integer (rtx, unsigned int, int); static void pdp11_output_function_prologue (FILE *, HOST_WIDE_INT); static void pdp11_output_function_epilogue (FILE *, HOST_WIDE_INT); static bool pdp11_rtx_costs (rtx, int, int, int *); +static bool pdp11_return_in_memory (tree, tree); /* Initialize the GCC target structure. */ #undef TARGET_ASM_BYTE_OP @@ -84,6 +85,11 @@ static bool pdp11_rtx_costs (rtx, int, int, int *); #undef TARGET_RTX_COSTS #define TARGET_RTX_COSTS pdp11_rtx_costs +#undef TARGET_STRUCT_VALUE_RTX +#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null +#undef TARGET_RETURN_IN_MEMORY +#define TARGET_RETURN_IN_MEMORY pdp11_return_in_memory + struct gcc_target targetm = TARGET_INITIALIZER; /* Nonzero if OP is a valid second operand for an arithmetic insn. */ @@ -1693,3 +1699,16 @@ output_addr_const_pdp11 (FILE *file, rtx x) output_operand_lossage ("invalid expression as operand"); } } + +static bool +pdp11_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED) +{ + /* Should probably return DImode and DFmode in memory, lest + we fill up all regs! + + have to, else we crash - exception: maybe return result in + ac0 if DFmode and FPU present - compatibility problem with + libraries for non-floating point.... */ + return (TYPE_MODE (type) == DImode + || (TYPE_MODE (type) == DFmode && ! TARGET_AC0)); +} diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h index 6e84cc4..f84e99f 100644 --- a/gcc/config/pdp11/pdp11.h +++ b/gcc/config/pdp11/pdp11.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, for the pdp-11 - Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 + Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). @@ -332,13 +332,6 @@ extern int target_flags; /* Register in which static-chain is passed to a function. */ /* ??? - i don't want to give up a reg for this! */ #define STATIC_CHAIN_REGNUM 4 - -/* Register in which address to store a structure value - is passed to a function. - let's make it an invisible first argument!!! */ - -#define STRUCT_VALUE 0 - /* Define the classes of registers for register constraints in the machine description. Also define ranges of constants. @@ -562,18 +555,6 @@ maybe ac0 ? - as option someday! */ #define FUNCTION_VALUE_REGNO_P(N) (((N) == 0) || (TARGET_AC0 && (N) == 8)) -/* should probably return DImode and DFmode in memory,lest - we fill up all regs! - - have to, else we crash - exception: maybe return result in - ac0 if DFmode and FPU present - compatibility problem with - libraries for non-floating point ... -*/ - -#define RETURN_IN_MEMORY(TYPE) \ - (TYPE_MODE(TYPE) == DImode || (TYPE_MODE(TYPE) == DFmode && ! TARGET_AC0)) - - /* 1 if N is a possible register number for function argument passing. - not used on pdp */ |