m68k.c (m68k_coff_asm_named_section): Restore deleted function.
authorBernardo Innocenti <bernie@develer.com>
Thu, 4 Sep 2003 19:14:51 +0000 (21:14 +0200)
committerBernardo Innocenti <bernie@gcc.gnu.org>
Thu, 4 Sep 2003 19:14:51 +0000 (21:14 +0200)
* config/m68k/m68k.c (m68k_coff_asm_named_section): Restore
deleted function.
* config/m68k/coff.h (M68K_TARGET_COFF): Add flag used to
enable coff-only code in m68k.c.

From-SVN: r71081

gcc/ChangeLog
gcc/config/m68k/coff.h
gcc/config/m68k/m68k.c

index 1608f4f1804acd90f90763e64244e9de9dfebaa0..2821669b83198b4a6425632563f7d99b148d93e2 100644 (file)
@@ -1,3 +1,10 @@
+2003-09-04  Bernardo Innocenti  <bernie@develer.com>
+
+       * config/m68k/m68k.c (m68k_coff_asm_named_section): Restore
+       deleted function.
+       * config/m68k/coff.h (M68K_TARGET_COFF): Add flag used to
+       enable coff-only code in m68k.c.
+
 2003-09-04  Nick Clifton  <nickc@redhat.com>
 
        * config.gcc: Add v850e1 target.  Allow --with-cpu to accept
index 0f199cf08b2abeb109a7b9e1dc8a93170f03e586..4806e9be13aa3b1fe0fb1bbe608693cb56cad336 100644 (file)
@@ -22,6 +22,10 @@ Boston, MA 02111-1307, USA.  */
 /* This file is included after m68k.h by CPU COFF specific files.  It
    is not a complete target itself.  */
 
+/* Used in m68k.c to include required support code.  */
+
+#define M68K_TARGET_COFF 1
+
 /* Generate sdb debugging information.  */
 
 #define SDB_DEBUGGING_INFO 1
index cbdf183745cc7044bcacc31e9e0313b8a99b3953..8cd6d6ca534959b49e8dd438e82b30f77aa32cbc 100644 (file)
@@ -53,6 +53,9 @@ static rtx find_addr_reg (rtx);
 static const char *singlemove_string (rtx *);
 static void m68k_output_function_prologue (FILE *, HOST_WIDE_INT);
 static void m68k_output_function_epilogue (FILE *, HOST_WIDE_INT);
+#ifdef M68K_TARGET_COFF
+static void m68k_coff_asm_named_section (const char *, unsigned int);
+#endif /* M68K_TARGET_COFF */
 #ifdef HPUX_ASM
 static void m68k_hp320_internal_label (FILE *, const char *, unsigned long);
 static void m68k_hp320_file_start (void);
@@ -3342,6 +3345,25 @@ output_xorsi3 (rtx *operands)
   return "eor%.l %2,%0";
 }
 
+#ifdef M68K_TARGET_COFF
+
+/* Output assembly to switch to section NAME with attribute FLAGS.  */
+
+static void
+m68k_coff_asm_named_section (const char *name, unsigned int flags)
+{
+  char flagchar;
+
+  if (flags & SECTION_WRITE)
+    flagchar = 'd';
+  else
+    flagchar = 'x';
+
+  fprintf (asm_out_file, "\t.section\t%s,\"%c\"\n", name, flagchar);
+}
+
+#endif /* M68K_TARGET_COFF */
+
 #ifdef HPUX_ASM
 static void
 m68k_hp320_internal_label (FILE *stream, const char *prefix,