aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mcore
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-05-18 22:23:27 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-05-18 22:23:27 -0700
commitfb49053ffdc69d527d610d2592f562abc8df63e0 (patch)
tree6cc771edadeb72a4893ed77408fb968ecad91282 /gcc/config/mcore
parent23b4deba7bcabbbcb607095eda02a705a510830b (diff)
downloadgcc-fb49053ffdc69d527d610d2592f562abc8df63e0.zip
gcc-fb49053ffdc69d527d610d2592f562abc8df63e0.tar.gz
gcc-fb49053ffdc69d527d610d2592f562abc8df63e0.tar.bz2
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it. * target-def.h (TARGET_ENCODE_SECTION_INFO): New. * target.h (encode_section_info): New. * varasm.c (make_decl_rtl, output_constant_def): Use it. * hooks.c (hook_tree_int_void): New. * hooks.h: Declare it. * config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h, config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000-protos.h, config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h: Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO referencing existing function. Make function static. * config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c, config/arc/arc.h, config/arm/arm.c, config/arm/arm.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c, config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c, config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c, config/v850/v850.h, config/vax/vax.c, config/vax/vms.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h: Move ENCODE_SECTION_INFO to out-of-line function and add TARGET_ENCODE_SECTION_INFO. * config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro. (ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. * config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename from SUBTARGET_* (switch_to_section): Replace in_rdata case with in_readonly_data. * config/h8300/h8300.c (h8300_encode_label): Make static. * config/h8300/h8300-protos.h: Update. * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename from rs6000_encode_section_info; make static. (rs6000_xcoff_encode_section_info): New. * config/v850/v850.c (v850_encode_data_area): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.c: Include flags.h. (vms_select_section): Fix typo. * doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous ENCODE_SECTION_INFO docs. From-SVN: r53606
Diffstat (limited to 'gcc/config/mcore')
-rw-r--r--gcc/config/mcore/mcore-protos.h2
-rw-r--r--gcc/config/mcore/mcore.c9
-rw-r--r--gcc/config/mcore/mcore.h10
3 files changed, 9 insertions, 12 deletions
diff --git a/gcc/config/mcore/mcore-protos.h b/gcc/config/mcore/mcore-protos.h
index 5cda48c..f985de4 100644
--- a/gcc/config/mcore/mcore-protos.h
+++ b/gcc/config/mcore/mcore-protos.h
@@ -35,8 +35,6 @@ extern int mcore_dllimport_name_p PARAMS ((const char *));
extern int mcore_naked_function_p PARAMS ((void));
#ifdef TREE_CODE
-extern void mcore_encode_section_info PARAMS ((tree, int));
-
#ifdef HAVE_MACHINE_MODES
extern int mcore_function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS, enum machine_mode, tree, int));
extern void mcore_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS, enum machine_mode, tree, int *));
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index f9f5ae2..61fc5bd 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -138,6 +138,7 @@ static void mcore_asm_named_section PARAMS ((const char *,
unsigned int));
#endif
static void mcore_unique_section PARAMS ((tree, int));
+static void mcore_encode_section_info PARAMS ((tree, int));
/* Initialize the GCC target structure. */
#ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES
@@ -156,6 +157,8 @@ static void mcore_unique_section PARAMS ((tree, int));
#define TARGET_ATTRIBUTE_TABLE mcore_attribute_table
#undef TARGET_ASM_UNIQUE_SECTION
#define TARGET_ASM_UNIQUE_SECTION mcore_unique_section
+#undef TARGET_ENCODE_SECTION_INFO
+#define TARGET_ENCODE_SECTION_INFO mcore_encode_section_info
struct gcc_target targetm = TARGET_INITIALIZER;
@@ -3417,8 +3420,10 @@ mcore_dllimport_p (decl)
return lookup_attribute ("dllimport", DECL_ATTRIBUTES (decl)) != 0;
}
-/* Cover function to implement ENCODE_SECTION_INFO. */
-void
+/* We must mark dll symbols specially. Definitions of dllexport'd objects
+ install some info in the .drective (PE) or .exports (ELF) sections. */
+
+static void
mcore_encode_section_info (decl, first)
tree decl;
int first ATTRIBUTE_UNUSED;
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index 32ceac6..da9d20c 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -1137,8 +1137,8 @@ switch_to_section (section, decl) \
#define MCORE_STRIP_NAME_ENCODING(SYM_NAME) \
((SYM_NAME) + ((SYM_NAME)[0] == '@' ? 3 : 0))
-/* Strip any text from SYM_NAME added by ENCODE_SECTION_INFO and store
- the result in VAR. */
+/* Strip any text from SYM_NAME added by targetm.encode_section_info
+ and store the result in VAR. */
#undef STRIP_NAME_ENCODING
#define STRIP_NAME_ENCODING(VAR, SYM_NAME) \
(VAR) = MCORE_STRIP_NAME_ENCODING (SYM_NAME)
@@ -1292,12 +1292,6 @@ extern long mcore_current_compilation_timestamp;
} \
while (0)
-/* We must mark dll symbols specially. Definitions of dllexport'd objects
- install some info in the .drective (PE) or .exports (ELF) sections. */
-#undef ENCODE_SECTION_INFO
-#define ENCODE_SECTION_INFO(DECL, FIRST) \
- mcore_encode_section_info (DECL, FIRST)
-
/* Print operand X (an rtx) in assembler syntax to file FILE.
CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
For `%' followed by punctuation, CODE is the punctuation and X is null. */