]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
iris5.h (BSS_SECTION_ASM_OP): Define.
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>
Mon, 9 Feb 2004 17:54:47 +0000 (17:54 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Mon, 9 Feb 2004 17:54:47 +0000 (17:54 +0000)
* config/mips/iris5.h (BSS_SECTION_ASM_OP): Define.
* config/mips/iris6.h (BSS_SECTION_ASM_OP): Undef.

* config/mips/iris6.h (TARGET_ASM_NAMED_SECTION): Moved ...
* config/mips/iris5.h: ... here.
* config/mips/iris5gas.h (TARGET_ASM_NAMED_SECTION): Remove.

* config/mips/iris6.h (EXTRA_SECTION_FUNCTIONS): Move ...
* config/mips/iris5.h: ... here.

From-SVN: r77546

gcc/ChangeLog
gcc/config/mips/iris5.h
gcc/config/mips/iris5gas.h
gcc/config/mips/iris6.h

index b972181403e976348f5f77c941f03a32ebdbf89b..699d1695732e4964f77abde8a3cdf2d1d214b30c 100644 (file)
@@ -1,3 +1,15 @@
+2004-02-09  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * config/mips/iris5.h (BSS_SECTION_ASM_OP): Define.
+       * config/mips/iris6.h (BSS_SECTION_ASM_OP): Undef.
+
+       * config/mips/iris6.h (TARGET_ASM_NAMED_SECTION): Moved ...
+       * config/mips/iris5.h: ... here.
+       * config/mips/iris5gas.h (TARGET_ASM_NAMED_SECTION): Remove.
+
+       * config/mips/iris6.h (EXTRA_SECTION_FUNCTIONS): Move ...
+       * config/mips/iris5.h: ... here.
+
 2004-02-09  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        * configure.ac: Remove default executable files before AC_PROG_CC.
index 84895efb2b770c77850ded351f8875389a64c36e..a172986310870e06d3a67b6e11e162ad768b66f5 100644 (file)
@@ -29,6 +29,10 @@ Boston, MA 02111-1307, USA.  */
 
 #define ABICALLS_ASM_OP "\t.option pic2"
 
+/* Dummy definition which allows EXTRA_SECTION_FUNCTIONS to be the same
+   for IRIX 5 and 6.  */
+#define BSS_SECTION_ASM_OP "\t.data"
+
 /* ??? This is correct, but not very useful, because there is no file that
    uses this macro.  */
 /* ??? The best way to handle global constructors under ELF is to use .init
@@ -190,6 +194,50 @@ Boston, MA 02111-1307, USA.  */
 #undef MIPS_DEFAULT_GVALUE
 #define MIPS_DEFAULT_GVALUE 0
 
+/* Switch into a generic section.  */
+#undef TARGET_ASM_NAMED_SECTION
+#define TARGET_ASM_NAMED_SECTION  irix_asm_named_section
+
+/* Define functions to read the name and flags of the current section.
+   They are used by irix_asm_output_align.  */
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS                                                \
+const char *                                                           \
+current_section_name (void)                                            \
+{                                                                      \
+  switch (in_section)                                                  \
+    {                                                                  \
+    case no_section:   return NULL;                                    \
+    case in_text:      return ".text";                                 \
+    case in_data:      return ".data";                                 \
+    case in_bss:       return ".bss";                                  \
+    case in_readonly_data:                                             \
+      if (mips_abi != ABI_32 && mips_abi != ABI_O64)                   \
+       return ".rodata";                                               \
+      else                                                             \
+       return ".rdata";                                                \
+    case in_named:                                                     \
+      return in_named_name;                                            \
+    }                                                                  \
+  abort ();                                                            \
+}                                                                      \
+                                                                       \
+unsigned int                                                           \
+current_section_flags (void)                                           \
+{                                                                      \
+  switch (in_section)                                                  \
+    {                                                                  \
+    case no_section:   return 0;                                       \
+    case in_text:      return SECTION_CODE;                            \
+    case in_data:      return SECTION_WRITE;                           \
+    case in_bss:       return SECTION_WRITE | SECTION_BSS;             \
+    case in_readonly_data: return 0;                                   \
+    case in_named:     return get_named_section_flags (in_named_name); \
+    }                                                                  \
+  abort ();                                                            \
+}
+
 /* Some assemblers have a bug that causes backslash escaped chars in .ascii
    to be misassembled, so avoid it by using .byte instead.  Write the original
    string in a comment, partly to improve readability and partly for the sake
index a084e2203da2e245b6719e738d4daa8ab7473b40..f79bf3dd9d867f2be9b1b4a2d996e4eb114918d0 100644 (file)
@@ -77,10 +77,6 @@ do {                                                 \
   fprintf (asm_out_file, "\t.etype\t0x%x;", (a));      \
 } while (0)
 
-/* Switch into a generic section.  */
-#undef TARGET_ASM_NAMED_SECTION
-#define TARGET_ASM_NAMED_SECTION  default_elf_asm_named_section
-
 /* Add -g to mips.h default to avoid confusing gas with local symbols
    generated from stabs info.  */
 #undef NM_FLAGS
index 6dfc98d891f3d3543f9a6572cc4022a9824042f4..b2bcb1a00c2d5cdb5b945622f70d223e24a787eb 100644 (file)
@@ -288,6 +288,7 @@ Boston, MA 02111-1307, USA.  */
    and dtor lists this way, so we use -init and -fini to invoke the
    do_global_* functions instead of running collect2.  */
 
+#undef BSS_SECTION_ASM_OP
 #define BSS_SECTION_ASM_OP_32  "\t.data"
 #define BSS_SECTION_ASM_OP_64  "\t.section\t.bss"
 #define BSS_SECTION_ASM_OP                     \
@@ -303,10 +304,6 @@ Boston, MA 02111-1307, USA.  */
    ? READONLY_DATA_SECTION_ASM_OP_64           \
    : READONLY_DATA_SECTION_ASM_OP_32)
 
-/* Switch into a generic section.  */
-#undef TARGET_ASM_NAMED_SECTION
-#define TARGET_ASM_NAMED_SECTION  irix_asm_named_section
-
 /* The default definition in defaults.h cannot cope with the runtime-variable
    definition of DWARF2_UNWIND_INFO above, so define here explicitly.  */
 #define EH_FRAME_SECTION_NAME ".eh_frame"
@@ -336,46 +333,6 @@ Boston, MA 02111-1307, USA.  */
 
 #endif /* _MIPS_SIM == _ABIO32 && !GAS */
 
-/* Define functions to read the name and flags of the current section.
-   They are used by irix_asm_output_align.  */
-
-#undef EXTRA_SECTION_FUNCTIONS
-#define EXTRA_SECTION_FUNCTIONS                                                \
-const char *                                                           \
-current_section_name (void)                                            \
-{                                                                      \
-  switch (in_section)                                                  \
-    {                                                                  \
-    case no_section:   return NULL;                                    \
-    case in_text:      return ".text";                                 \
-    case in_data:      return ".data";                                 \
-    case in_bss:       return ".bss";                                  \
-    case in_readonly_data:                                             \
-      if (mips_abi != ABI_32 && mips_abi != ABI_O64)                   \
-       return ".rodata";                                               \
-      else                                                             \
-       return ".rdata";                                                \
-    case in_named:                                                     \
-      return in_named_name;                                            \
-    }                                                                  \
-  abort ();                                                            \
-}                                                                      \
-                                                                       \
-unsigned int                                                           \
-current_section_flags (void)                                           \
-{                                                                      \
-  switch (in_section)                                                  \
-    {                                                                  \
-    case no_section:   return 0;                                       \
-    case in_text:      return SECTION_CODE;                            \
-    case in_data:      return SECTION_WRITE;                           \
-    case in_bss:       return SECTION_WRITE | SECTION_BSS;             \
-    case in_readonly_data: return 0;                                   \
-    case in_named:     return get_named_section_flags (in_named_name); \
-    }                                                                  \
-  abort ();                                                            \
-}
-
 /* SGI assembler needs all sorts of extra help to do alignment properly.  */
 #undef ASM_OUTPUT_ALIGN
 #define ASM_OUTPUT_ALIGN irix_asm_output_align