pdp11.c (TARGET_STRUCT_VALUE_RTX): New.
authorKazu Hirata <kazu@cs.umass.edu>
Mon, 26 Jan 2004 18:17:58 +0000 (18:17 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Mon, 26 Jan 2004 18:17:58 +0000 (18:17 +0000)
* 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

gcc/ChangeLog
gcc/config/pdp11/pdp11.c
gcc/config/pdp11/pdp11.h

index 65f5704f49fe401e4df5e88939b0810accf845a1..566d6baa58e318d67eb9c8a1c871d4389a46327a 100644 (file)
@@ -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
index 049b541a4ac3b5132febd85f9c008c5fed1dfe29..117510955b4a9d18c787fbf493c4e92bee8bd59e 100644 (file)
@@ -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);
 \f
 /* 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;
 \f
 /* 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));
+}
index 6e84cc4b9f43d587513d42e796e85da652ea33c8..f84e99f847e7a0f42b3c88e0047ae11edd5204ad 100644 (file)
@@ -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
-
 \f
 /* 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 */