summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-11 06:21:05 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-11 06:21:05 +0000
commit9bfbd4c42e77ad667a51fb862be504073f030e5b (patch)
treeab47828054759e24da4513df7c736dc1a32acd86 /gcc
parent87282826406dcb66e2f7399652ad6bb3906a5239 (diff)
downloadppe42-gcc-9bfbd4c42e77ad667a51fb862be504073f030e5b.tar.gz
ppe42-gcc-9bfbd4c42e77ad667a51fb862be504073f030e5b.zip
2004-04-11 Andrew Pinski <pinskia@physics.uc.edu>
* varasm.c (text_section): Use TEXT_SECTION_ASM_OP and ASM_OUTPUT_ALIGN instead of SECTION_FORMAT_STRING and NORMAL_TEXT_SECTION_NAME. (unlikely_text_section): Check targetm.have_named_sections instead of TARGET_ASM_NAMED_SECTION and use TEXT_SECTION_ASM_OP instead of SECTION_FORMAT_STRING. * config/mips/iris5.h (current_section_name): Add in_unlikely_executed_text case and move the abort into the switch. * config/rs6000/sysv4.h (HOT_TEXT_SECTION_NAME): Remove. (NORMAL_TEXT_SECTION_NAME): Remove. (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Remove. (SECTION_FORMAT_STRING): Remove. * defaults.h (SECTION_FORMAT_STRING): Remove. * tm.texi (NORMAL_TEXT_SECTION_NAME): Remove. (SECTION_FORMAT_STRING): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80593 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog18
-rw-r--r--gcc/config/mips/iris5.h3
-rw-r--r--gcc/config/rs6000/sysv4.h5
-rw-r--r--gcc/defaults.h4
-rw-r--r--gcc/doc/tm.texi13
-rw-r--r--gcc/varasm.c19
6 files changed, 30 insertions, 32 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dd10d4e7d93..839e6483e55 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,21 @@
+2004-04-11 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * varasm.c (text_section): Use TEXT_SECTION_ASM_OP and
+ ASM_OUTPUT_ALIGN instead of SECTION_FORMAT_STRING
+ and NORMAL_TEXT_SECTION_NAME.
+ (unlikely_text_section): Check targetm.have_named_sections
+ instead of TARGET_ASM_NAMED_SECTION and use TEXT_SECTION_ASM_OP
+ instead of SECTION_FORMAT_STRING.
+ * config/mips/iris5.h (current_section_name): Add
+ in_unlikely_executed_text case and move the abort into the switch.
+ * config/rs6000/sysv4.h (HOT_TEXT_SECTION_NAME): Remove.
+ (NORMAL_TEXT_SECTION_NAME): Remove.
+ (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Remove.
+ (SECTION_FORMAT_STRING): Remove.
+ * defaults.h (SECTION_FORMAT_STRING): Remove.
+ * tm.texi (NORMAL_TEXT_SECTION_NAME): Remove.
+ (SECTION_FORMAT_STRING): Remove.
+
2004-04-10 Joseph S. Myers <jsm@polyomino.org.uk>
* c-typeck.c (common_type): Prefer long long to long when same
diff --git a/gcc/config/mips/iris5.h b/gcc/config/mips/iris5.h
index 4114c928161..0e7eaaddd68 100644
--- a/gcc/config/mips/iris5.h
+++ b/gcc/config/mips/iris5.h
@@ -213,6 +213,7 @@ current_section_name (void) \
switch (in_section) \
{ \
case no_section: return NULL; \
+ case in_unlikely_executed_text: \
case in_text: return ".text"; \
case in_data: return ".data"; \
case in_bss: return ".bss"; \
@@ -223,8 +224,8 @@ current_section_name (void) \
return ".rdata"; \
case in_named: \
return in_named_name; \
+ default: abort(); \
} \
- abort (); \
} \
\
unsigned int \
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 39497e9736b..1e0ac3707f6 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -434,11 +434,6 @@ do { \
#define BSS_SECTION_ASM_OP "\t.section\t\".bss\""
-#define HOT_TEXT_SECTION_NAME ".text"
-#define NORMAL_TEXT_SECTION_NAME ".text"
-#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text.unlikely"
-#define SECTION_FORMAT_STRING ".section\t\"%s\"\n\t.align 2\n"
-
/* Override elfos.h definition. */
#undef INIT_SECTION_ASM_OP
#define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""
diff --git a/gcc/defaults.h b/gcc/defaults.h
index efd28af753a..697ed8eca0c 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -631,10 +631,6 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME "text.unlikely"
#endif
-#ifndef SECTION_FORMAT_STRING
-#define SECTION_FORMAT_STRING "\t.section\t%s\n\t.align 2\n"
-#endif
-
#ifndef HAS_LONG_COND_BRANCH
#define HAS_LONG_COND_BRANCH 0
#endif
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 1d413e0dad5..39ddcc39130 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -5802,13 +5802,6 @@ frequently executed functions of the program. If not defined, GCC will provide
a default definition if the target supports named sections.
@end defmac
-@defmac NORMAL_TEXT_SECTION_NAME
-If defined, a C string constant for the name of the section containing code
-that does not go into the ``unlikely executed text'' partition. This is used
-as part of the optimization that partitions hot and cold basic blocks into
-separate sections in the .o and executable files.
-@end defmac
-
@defmac UNLIKELY_EXECUTED_TEXT_SECTION_NAME
If defined, a C string constant for the name of the section containing unlikely
executed functions in the program.
@@ -5860,12 +5853,6 @@ finalization code. If not defined, GCC will assume such a section does
not exist.
@end defmac
-@defmac SECTION_FORMAT_STRING
-If defined, format string used by fprintf to write out the
-text section headers for the hot and cold sections of the
-assembly file, when hot and cold partitioning is being performed.
-@end defmac
-
@defmac CRT_CALL_STATIC_FUNCTION (@var{section_op}, @var{function})
If defined, an ASM statement that switches to a different section
via @var{section_op}, calls @var{function}, and switches back to
diff --git a/gcc/varasm.c b/gcc/varasm.c
index c35c9b7773e..780bba8a11a 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -208,7 +208,8 @@ text_section (void)
if (in_section != in_text)
{
in_section = in_text;
- fprintf (asm_out_file, SECTION_FORMAT_STRING, NORMAL_TEXT_SECTION_NAME);
+ fprintf (asm_out_file, "%s\n", TEXT_SECTION_ASM_OP);
+ ASM_OUTPUT_ALIGN (asm_out_file, 2);
}
}
@@ -221,15 +222,15 @@ unlikely_text_section (void)
&& (in_section != in_named
|| strcmp (in_named_name, UNLIKELY_EXECUTED_TEXT_SECTION_NAME) != 0))
{
-#ifdef TARGET_ASM_NAMED_SECTION
-
- named_section (NULL_TREE, UNLIKELY_EXECUTED_TEXT_SECTION_NAME, 0);
+ if (targetm.have_named_sections)
+ named_section (NULL_TREE, UNLIKELY_EXECUTED_TEXT_SECTION_NAME, 0);
+ else
+ {
+ in_section = in_unlikely_executed_text;
+ fprintf (asm_out_file, "%s\n", TEXT_SECTION_ASM_OP);
+ ASM_OUTPUT_ALIGN (asm_out_file, 2);
+ }
-#else
- in_section = in_unlikely_executed_text;
- fprintf (asm_out_file, SECTION_FORMAT_STRING,
- UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
-#endif /* ifdef TARGET_ASM_NAMED_SECTION */
if (!unlikely_section_label_printed)
{
fprintf (asm_out_file, "__%s_unlikely_section:\n",
OpenPOWER on IntegriCloud