diff options
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/config/mips/iris5.h | 48 | ||||
-rw-r--r-- | gcc/config/mips/iris5gas.h | 4 | ||||
-rw-r--r-- | gcc/config/mips/iris6.h | 45 |
4 files changed, 61 insertions, 48 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b972181403e..699d1695732 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,17 @@ 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. * configure: Regenerate. diff --git a/gcc/config/mips/iris5.h b/gcc/config/mips/iris5.h index 84895efb2b7..a1729863108 100644 --- a/gcc/config/mips/iris5.h +++ b/gcc/config/mips/iris5.h @@ -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 diff --git a/gcc/config/mips/iris5gas.h b/gcc/config/mips/iris5gas.h index a084e2203da..f79bf3dd9d8 100644 --- a/gcc/config/mips/iris5gas.h +++ b/gcc/config/mips/iris5gas.h @@ -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 diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h index 6dfc98d891f..b2bcb1a00c2 100644 --- a/gcc/config/mips/iris6.h +++ b/gcc/config/mips/iris6.h @@ -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 |