diff options
Diffstat (limited to 'gcc/config/mips')
-rw-r--r-- | gcc/config/mips/elf.h | 5 | ||||
-rw-r--r-- | gcc/config/mips/elf64.h | 5 | ||||
-rw-r--r-- | gcc/config/mips/iris6.h | 35 | ||||
-rw-r--r-- | gcc/config/mips/linux.h | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 8 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 21 | ||||
-rw-r--r-- | gcc/config/mips/rtems64.h | 5 | ||||
-rw-r--r-- | gcc/config/mips/vxworks.h | 5 |
8 files changed, 30 insertions, 59 deletions
diff --git a/gcc/config/mips/elf.h b/gcc/config/mips/elf.h index d3267379bf1..de870c09a89 100644 --- a/gcc/config/mips/elf.h +++ b/gcc/config/mips/elf.h @@ -225,13 +225,12 @@ do { \ /* A list of other sections which the compiler might be "in" at any given time. */ #undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_sbss, in_rdata +#define EXTRA_SECTIONS in_sdata, in_sbss #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ - SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \ - SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) + SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ void FN () \ diff --git a/gcc/config/mips/elf64.h b/gcc/config/mips/elf64.h index a162fc41a9f..8d6bf4a6752 100644 --- a/gcc/config/mips/elf64.h +++ b/gcc/config/mips/elf64.h @@ -215,12 +215,11 @@ do { \ /* A list of other sections which the compiler might be "in" at any given time. */ #undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_rdata +#define EXTRA_SECTIONS in_sdata #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ - SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) + SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ void FN () \ diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h index 71a18e83a16..ff03d35aeaa 100644 --- a/gcc/config/mips/iris6.h +++ b/gcc/config/mips/iris6.h @@ -1,5 +1,6 @@ /* Definitions of target machine for GNU compiler. Iris version 6. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002 + Free Software Foundation, Inc. This file is part of GNU CC. @@ -249,8 +250,13 @@ Boston, MA 02111-1307, USA. */ do_global_* functions instead of running collect2. */ #define BSS_SECTION_ASM_OP "\t.section\t.bss" -#define CONST_SECTION_ASM_OP_32 "\t.rdata" -#define CONST_SECTION_ASM_OP_64 "\t.section\t.rodata" + +#define READONLY_DATA_SECTION_ASM_OP_32 "\t.rdata" +#define READONLY_DATA_SECTION_ASM_OP_64 "\t.section\t.rodata" +#define READONLY_DATA_SECTION_ASM_OP \ + (mips_abi != ABI_32 && mips_abi != ABI_O64 \ + ? READONLY_DATA_SECTION_ASM_OP_64 \ + : READONLY_DATA_SECTION_ASM_OP_32) /* A default list of other sections which we might be "in" at any given time. For targets that use additional sections (e.g. .tdesc) you @@ -258,14 +264,12 @@ Boston, MA 02111-1307, USA. */ includes this file. */ #undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_rdata, in_const +#define EXTRA_SECTIONS in_sdata /* A default list of extra section function definitions. For targets that use additional sections (e.g. .tdesc) you should override this definition in the target-specific file which includes this file. */ -/* ??? rdata_section is now same as svr4 const_section. */ - #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ void \ @@ -278,19 +282,6 @@ sdata_section () \ } \ } \ \ -void \ -rdata_section () \ -{ \ - if (in_section != in_rdata) \ - { \ - if (mips_abi != ABI_32 && mips_abi != ABI_O64) \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_64); \ - else \ - fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_32); \ - in_section = in_rdata; \ - } \ -} \ - \ const char * \ current_section_name () \ { \ @@ -301,8 +292,7 @@ current_section_name () \ case in_data: return ".data"; \ case in_sdata: return ".sdata"; \ case in_bss: return ".bss"; \ - case in_rdata: \ - case in_const: \ + case in_readonly_data: \ if (mips_abi != ABI_32 && mips_abi != ABI_O64) \ return ".rodata"; \ else \ @@ -323,8 +313,7 @@ current_section_flags () \ case in_data: return SECTION_WRITE; \ case in_sdata: return SECTION_WRITE | SECTION_SMALL; \ case in_bss: return SECTION_WRITE | SECTION_BSS; \ - case in_rdata: \ - case in_const: return 0; \ + case in_readonly_data: return 0; \ case in_named: return get_named_section_flags (in_named_name); \ } \ abort (); \ diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h index 755a8c00228..701e896aa12 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -93,13 +93,12 @@ do { \ /* A list of other sections which the compiler might be "in" at any given time. */ #undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_sbss, in_rdata +#define EXTRA_SECTIONS in_sdata, in_sbss #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ - SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \ - SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) + SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ void FN () \ diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index b93e53180d8..f551d627889 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -7913,7 +7913,7 @@ mips_select_rtx_section (mode, x) { /* For embedded applications, always put constants in read-only data, in order to reduce RAM usage. */ - READONLY_DATA_SECTION (); + readonly_data_section (); } else { @@ -7932,7 +7932,7 @@ mips_select_rtx_section (mode, x) read-only). */ data_section (); else - READONLY_DATA_SECTION (); + readonly_data_section (); } } @@ -7979,7 +7979,7 @@ mips_select_section (decl, reloc, align) && (TREE_CODE (decl) != STRING_CST || !flag_writable_strings))) && ! (flag_pic && reloc)) - READONLY_DATA_SECTION (); + readonly_data_section (); else if (size > 0 && size <= mips_section_threshold) SMALL_DATA_SECTION (); else @@ -8002,7 +8002,7 @@ mips_select_section (decl, reloc, align) && (TREE_CODE (decl) != STRING_CST || !flag_writable_strings))) && ! (flag_pic && reloc)) - READONLY_DATA_SECTION (); + readonly_data_section (); else data_section (); } diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index dba54e65816..3dea475d676 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -169,7 +169,6 @@ extern struct rtx_def *mips_load_reg4; /* 4th reg to check for load delay */ extern int mips_string_length; /* length of strings for mips16 */ /* Functions to change what output section we are using. */ -extern void rdata_section PARAMS ((void)); extern void sdata_section PARAMS ((void)); extern void sbss_section PARAMS ((void)); @@ -4534,7 +4533,7 @@ while (0) if (TREE_PUBLIC (DECL) && DECL_NAME (DECL)) \ ASM_GLOBALIZE_LABEL (STREAM, NAME); \ \ - READONLY_DATA_SECTION (); \ + readonly_data_section (); \ ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \ mips_declare_object (STREAM, NAME, "", ":\n\t.space\t%u\n", \ (SIZE)); \ @@ -4676,7 +4675,7 @@ do { \ { \ const char *p = STRING; \ int size = strlen (p) + 1; \ - rdata_section (); \ + readonly_data_section (); \ assemble_string (p, size); \ } @@ -4689,15 +4688,13 @@ do { \ #define TEXT_SECTION_ASM_OP "\t.text" /* instructions */ #define DATA_SECTION_ASM_OP "\t.data" /* large data */ #define SDATA_SECTION_ASM_OP "\t.sdata" /* small data */ -#define RDATA_SECTION_ASM_OP "\t.rdata" /* read-only data */ -#undef READONLY_DATA_SECTION -#define READONLY_DATA_SECTION rdata_section +#define READONLY_DATA_SECTION_ASM_OP "\t.rdata" /* read-only data */ #define SMALL_DATA_SECTION sdata_section /* What other sections we support other than the normal .data/.text. */ #undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_rdata +#define EXTRA_SECTIONS in_sdata /* Define the additional functions to select our additional sections. */ @@ -4719,16 +4716,6 @@ sdata_section () \ fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ in_section = in_sdata; \ } \ -} \ - \ -void \ -rdata_section () \ -{ \ - if (in_section != in_rdata) \ - { \ - fprintf (asm_out_file, "%s\n", RDATA_SECTION_ASM_OP); \ - in_section = in_rdata; \ - } \ } /* Given a decl node or constant node, choose the section to output it in diff --git a/gcc/config/mips/rtems64.h b/gcc/config/mips/rtems64.h index e3c74ca04ea..c4e4f4bc13f 100644 --- a/gcc/config/mips/rtems64.h +++ b/gcc/config/mips/rtems64.h @@ -26,12 +26,11 @@ Boston, MA 02111-1307, USA. */ -D__rtems__ -Asystem=rtems" #undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_rdata +#define EXTRA_SECTIONS in_sdata #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ - SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) + SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) #undef STARTFILE_SPEC #undef ENDFILE_SPEC diff --git a/gcc/config/mips/vxworks.h b/gcc/config/mips/vxworks.h index 9eca3b71c6a..67838e201fd 100644 --- a/gcc/config/mips/vxworks.h +++ b/gcc/config/mips/vxworks.h @@ -18,13 +18,12 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_rdata, in_sbss +#define EXTRA_SECTIONS in_sdata, in_sbss #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ - SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \ - SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) + SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) #undef STARTFILE_SPEC #undef ENDFILE_SPEC |