c4x.c (TARGET_ASM_EXTERNAL_LIBCALL): New.
authorKazu Hirata <kazu@cs.umass.edu>
Wed, 28 Jan 2004 05:27:12 +0000 (05:27 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Wed, 28 Jan 2004 05:27:12 +0000 (05:27 +0000)
* config/c4x/c4x.c (TARGET_ASM_EXTERNAL_LIBCALL): New.
(TARGET_STRUCT_VALUE_RTX): Likewise.
(c4x_external_libcall): Likewise.
(c4x_struct_value_rtx): Likewise.
* config/c4x/c4x.h: Remove.
(STRUCT_VALUE_REGNUM): Likewise.
(ASM_OUTPUT_EXTERNAL_LIBCALL): Likewise.

From-SVN: r76779

gcc/ChangeLog
gcc/config/c4x/c4x.c
gcc/config/c4x/c4x.h

index e44a7daf559a6f74f2dce9926dc57f3f8dcdea6a..ea276203497380cb1b1645213b51166036857368 100644 (file)
@@ -1,3 +1,13 @@
+2004-01-28  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/c4x/c4x.c (TARGET_ASM_EXTERNAL_LIBCALL): New.
+       (TARGET_STRUCT_VALUE_RTX): Likewise.
+       (c4x_external_libcall): Likewise.
+       (c4x_struct_value_rtx): Likewise.
+       * config/c4x/c4x.h: Remove.
+       (STRUCT_VALUE_REGNUM): Likewise.
+       (ASM_OUTPUT_EXTERNAL_LIBCALL): Likewise.
+
 2004-01-28  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/i386/i386.c (TARGET_PROMOTE_PROTOTYPES): New.
index 9a6b88832e10c20c71b361c7cf6855c365cd84ce..b389296f13b9aef8cee8aebfd9dc74fa8312c3b6 100644 (file)
@@ -1,5 +1,5 @@
 /* Subroutines for assembler code output on the TMS320C[34]x
-   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
    Free Software Foundation, Inc.
 
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
@@ -200,6 +200,8 @@ static void c4x_globalize_label (FILE *, const char *);
 static bool c4x_rtx_costs (rtx, int, int, int *);
 static int c4x_address_cost (rtx);
 static void c4x_init_libfuncs (void);
+static void c4x_external_libcall (rtx);
+static rtx c4x_struct_value_rtx (tree, int);
 \f
 /* Initialize the GCC target structure.  */
 #undef TARGET_ASM_BYTE_OP
@@ -215,6 +217,9 @@ static void c4x_init_libfuncs (void);
 #undef TARGET_ASM_FILE_END
 #define TARGET_ASM_FILE_END c4x_file_end
 
+#undef TARGET_ASM_EXTERNAL_LIBCALL
+#define TARGET_ASM_EXTERNAL_LIBCALL c4x_external_libcall
+
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE c4x_attribute_table
 
@@ -244,6 +249,9 @@ static void c4x_init_libfuncs (void);
 #undef TARGET_INIT_LIBFUNCS
 #define TARGET_INIT_LIBFUNCS c4x_init_libfuncs
 
+#undef TARGET_STRUCT_VALUE_RTX
+#define TARGET_STRUCT_VALUE_RTX c4x_struct_value_rtx
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Override command line options.
@@ -5017,3 +5025,21 @@ c4x_rtx_costs (rtx x, int code, int outer_code, int *total)
       return false;
     }
 }
+\f
+/* Worker function for TARGET_ASM_EXTERNAL_LIBCALL.  */
+
+static void
+c4x_external_libcall (rtx fun)
+{
+  /* This is only needed to keep asm30 happy for ___divqf3 etc.  */
+  c4x_external_ref (XSTR (fun, 0));
+}
+
+/* Worker function for TARGET_STRUCT_VALUE_RTX.  */
+
+static rtx
+c4x_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
+                     int incoming ATTRIBUTE_UNUSED)
+{
+  return gen_rtx_REG (Pmode, AR0_REGNO);
+}
index aa80ffbd17075572fb492d6d42426ee14dac5282..66e5edf82a4b4dce26549f80020bbf3636cb93f8 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.  TMS320C[34]x
    Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003 Free Software Foundation, Inc.
+   2003, 2004 Free Software Foundation, Inc.
 
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
               and Herman Ten Brugge (Haj.Ten.Brugge@net.HCC.nl).
@@ -1161,7 +1161,6 @@ CUMULATIVE_ARGS;
 /* How Large Values Are Returned.  */
 
 #define DEFAULT_PCC_STRUCT_RETURN      0
-#define STRUCT_VALUE_REGNUM            AR0_REGNO       /* AR0.  */
 
 /* Varargs handling.  */
 
@@ -1491,13 +1490,6 @@ fini_section ()                                                  \
 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
 c4x_external_ref (NAME)
 
-/* A C statement to output on FILE an assembler pseudo-op to
-   declare a library function named external.
-   (Only needed to keep asm30 happy for ___divqf3 etc.)  */
-
-#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
-c4x_external_ref (XSTR (FUN, 0))
-
 /* The prefix to add to user-visible assembler symbols.  */
 
 #define USER_LABEL_PREFIX "_"