aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-08-16 19:33:41 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-08-16 19:33:41 -0700
commit715bdd29f333820829fa846ea8302b8e540b88f2 (patch)
tree0a6ccfe97cf32b2d424aaa6d485705e909e9d189 /gcc/config
parent09e07be6d7e6d66b2d48fc20516ce0385cfb268e (diff)
downloadgcc-715bdd29f333820829fa846ea8302b8e540b88f2.zip
gcc-715bdd29f333820829fa846ea8302b8e540b88f2.tar.gz
gcc-715bdd29f333820829fa846ea8302b8e540b88f2.tar.bz2
varasm.c (named_section_flags): Remove align parameter.
* varasm.c (named_section_flags): Remove align parameter. * varasm.c, dwarf2out.c: Update all callers. * output.h: Update prototypes. * target.h (target.asm_out.named_section): Remove align parameter. * varasm.c, config/a29k/a29k.c, config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, config/h8300/h8300.c, config/i386/i386.c, config/i386/winnt.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/rs6000/rs6000.c, config/sh/sh.c, config/sparc/sparc.c: Update implementations to match. * varasm.c (in_named_entry_eq, in_named_entry_hash): New. (get_named_section_flags, set_named_section_flags): New. (named_section_flags): Use them. (named_section): Do decl vs section flags check here... (default_section_type_flags): ... not here. (init_varasm_once): Create in_named_htab. (resolve_unique_section): Mark reloc unused. From-SVN: r44953
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/a29k/a29k.c6
-rw-r--r--gcc/config/alpha/alpha.c11
-rw-r--r--gcc/config/arm/arm.c4
-rw-r--r--gcc/config/c4x/c4x.c6
-rw-r--r--gcc/config/h8300/h8300.c6
-rw-r--r--gcc/config/i386/i386.c12
-rw-r--r--gcc/config/i386/winnt.c3
-rw-r--r--gcc/config/m68k/m68k.c6
-rw-r--r--gcc/config/mcore/mcore.c4
-rw-r--r--gcc/config/mips/mips.c14
-rw-r--r--gcc/config/rs6000/rs6000.c12
-rw-r--r--gcc/config/sh/sh.c6
-rw-r--r--gcc/config/sparc/sparc.c6
13 files changed, 30 insertions, 66 deletions
diff --git a/gcc/config/a29k/a29k.c b/gcc/config/a29k/a29k.c
index 8d816b2..420e2f5 100644
--- a/gcc/config/a29k/a29k.c
+++ b/gcc/config/a29k/a29k.c
@@ -48,8 +48,7 @@ static void compute_regstack_size PARAMS ((void));
static void check_epilogue_internal_label PARAMS ((FILE *));
static void output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static void output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
-static void a29k_asm_named_section PARAMS ((const char *, unsigned int,
- unsigned int));
+static void a29k_asm_named_section PARAMS ((const char *, unsigned int));
#define min(A,B) ((A) < (B) ? (A) : (B))
@@ -1572,10 +1571,9 @@ output_function_epilogue (file, size)
}
static void
-a29k_asm_named_section (name, flags, align)
+a29k_asm_named_section (name, flags)
const char *name;
unsigned int flags ATTRIBUTE_UNUSED;
- unsigned int align ATTRIBUTE_UNUSED;
{
/* ??? Is it really correct to mark all sections as "bss"? */
fprintf (asm_out_file, "\t.sect %s, bss\n\t.use %s\n", name, name);
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index aa2f979..741a5ee 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -151,8 +151,7 @@ static void alpha_output_function_end_prologue
#if TARGET_ABI_OPEN_VMS
static int vms_valid_decl_attribute_p PARAMS ((tree, tree, tree, tree));
static unsigned int vms_section_type_flags PARAMS ((tree, const char *, int));
-static void vms_asm_named_section PARAMS ((const char *, unsigned int,
- unsigned int));
+static void vms_asm_named_section PARAMS ((const char *, unsigned int));
static void vms_asm_out_constructor PARAMS ((rtx, int));
static void vms_asm_out_destructor PARAMS ((rtx, int));
# undef TARGET_VALID_DECL_ATTRIBUTE
@@ -6568,10 +6567,9 @@ vms_section_type_flags (decl, name, reloc)
the section; 0 if the default should be used. */
static void
-vms_asm_named_section (name, flags, align)
+vms_asm_named_section (name, flags)
const char *name;
unsigned int flags;
- unsigned int align;
{
const char *flag_str = "";
@@ -6581,11 +6579,6 @@ vms_asm_named_section (name, flags, align)
flag_str = ",NOWRT";
fprintf (asm_out_file, ".section\t%s%s\n", name, flag_str);
-
- /* ??? An indicated alignment of 1 byte is only used by dwarf,
- and for that we turn off auto-alignment. */
- if (align == 1)
- ASM_OUTPUT_ALIGN (asm_out_file, 0);
}
/* Record an element in the table of global constructors. SYMBOL is
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 7f89a3d..13669b7 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -116,7 +116,6 @@ static void thumb_output_function_prologue PARAMS ((FILE *,
static int arm_comp_type_attributes PARAMS ((tree, tree));
static void arm_set_default_type_attributes PARAMS ((tree));
static void arm_elf_asm_named_section PARAMS ((const char *,
- unsigned int,
unsigned int));
#undef Hint
#undef Mmode
@@ -10829,10 +10828,9 @@ aof_dump_imports (f)
used before the section type. */
static void
-arm_elf_asm_named_section (name, flags, align)
+arm_elf_asm_named_section (name, flags)
const char *name;
unsigned int flags;
- unsigned int align ATTRIBUTE_UNUSED;
{
char flagchars[8], *f = flagchars;
const char *type;
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index f6c987b..71d4c5c 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -193,8 +193,7 @@ static int c4x_rptb_valid_p PARAMS ((rtx, rtx));
static int c4x_label_ref_used_p PARAMS ((rtx, rtx));
static int c4x_valid_type_attribute_p PARAMS ((tree, tree, tree, tree));
static void c4x_insert_attributes PARAMS ((tree, tree *));
-static void c4x_asm_named_section PARAMS ((const char *, unsigned int,
- unsigned int));
+static void c4x_asm_named_section PARAMS ((const char *, unsigned int));
/* Initialize the GCC target structure. */
#undef TARGET_VALID_TYPE_ATTRIBUTE
@@ -5183,10 +5182,9 @@ c4x_expand_builtin (exp, target, subtarget, mode, ignore)
}
static void
-c4x_asm_named_section (name, flags, align)
+c4x_asm_named_section (name, flags)
const char *name;
unsigned int flags ATTRIBUTE_UNUSED;
- unsigned int align ATTRIBUTE_UNUSED;
{
fprintf (asm_out_file, "\t.sect\t\"%s\"\n", name);
}
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 55aef38..61c255f 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -56,8 +56,7 @@ static const char *cond_string PARAMS ((enum rtx_code));
static int h8300_valid_decl_attribute PARAMS ((tree, tree, tree, tree));
static void h8300_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static void h8300_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
-static void h8300_asm_named_section PARAMS ((const char *, unsigned int,
- unsigned int));
+static void h8300_asm_named_section PARAMS ((const char *, unsigned int));
/* CPU_TYPE, says what cpu we're compiling for. */
int cpu_type;
@@ -3329,10 +3328,9 @@ h8300_adjust_insn_length (insn, length)
}
static void
-h8300_asm_named_section (name, flags, align)
+h8300_asm_named_section (name, flags)
const char *name;
unsigned int flags ATTRIBUTE_UNUSED;
- unsigned int align ATTRIBUTE_UNUSED;
{
/* ??? Perhaps we should be using default_coff_asm_named_section. */
fprintf (asm_out_file, "\t.section %s\n", name);
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 302bd6d..e952e61 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -612,8 +612,7 @@ static int ix86_comp_type_attributes PARAMS ((tree, tree));
static void ix86_svr3_asm_out_constructor PARAMS ((rtx, int));
#endif
#if defined(TARGET_ELF) && defined(TARGET_COFF)
-static void sco_asm_named_section PARAMS ((const char *, unsigned int,
- unsigned int));
+static void sco_asm_named_section PARAMS ((const char *, unsigned int));
static void sco_asm_out_constructor PARAMS ((rtx, int));
#endif
@@ -2342,7 +2341,7 @@ ix86_asm_file_end (file)
error_mark_node);
DECL_ONE_ONLY (decl) = 1;
UNIQUE_SECTION (decl, 0);
- named_section (decl, NULL, 0);
+ named_section (decl, NULL);
}
else
#else
@@ -10839,15 +10838,14 @@ ix86_svr3_asm_out_constructor (symbol, priority)
#if defined(TARGET_ELF) && defined(TARGET_COFF)
static void
-sco_asm_named_section (name, flags, align)
+sco_asm_named_section (name, flags)
const char *name;
unsigned int flags;
- unsigned int align;
{
if (TARGET_ELF)
- default_elf_asm_named_section (name, flags, align);
+ default_elf_asm_named_section (name, flags);
else
- default_coff_asm_named_section (name, flags, align);
+ default_coff_asm_named_section (name, flags);
}
static void
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index ff13c38..d32224f 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -523,10 +523,9 @@ i386_pe_section_type_flags (decl, name, reloc)
}
void
-i386_pe_asm_named_section (name, flags, align)
+i386_pe_asm_named_section (name, flags)
const char *name;
unsigned int flags;
- unsigned int align ATTRIBUTE_UNUSED;
{
char flagchars[8], *f = flagchars;
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 57ddad2..3a832ff 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -61,8 +61,7 @@ static rtx find_addr_reg PARAMS ((rtx));
static const char *singlemove_string PARAMS ((rtx *));
static void m68k_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static void m68k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
-static void m68k_coff_asm_named_section PARAMS ((const char *, unsigned int,
- unsigned int));
+static void m68k_coff_asm_named_section PARAMS ((const char *, unsigned int));
#ifdef CTOR_LIST_BEGIN
static void m68k_svr3_asm_out_constructor PARAMS ((rtx, int));
#endif
@@ -4218,10 +4217,9 @@ output_xorsi3 (operands)
/* Output assembly to switch to section NAME with attribute FLAGS. */
static void
-m68k_coff_asm_named_section (name, flags, align)
+m68k_coff_asm_named_section (name, flags)
const char *name;
unsigned int flags;
- unsigned int align ATTRIBUTE_UNUSED;
{
char flagchar;
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index 778b734..742875e 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -133,7 +133,6 @@ static int mcore_dllimport_p PARAMS ((tree));
static int mcore_valid_decl_attribute PARAMS ((tree, tree,
tree, tree));
static void mcore_asm_named_section PARAMS ((const char *,
- unsigned int,
unsigned int));
/* Initialize the GCC target structure. */
@@ -3599,10 +3598,9 @@ mcore_naked_function_p ()
}
static void
-mcore_asm_named_section (name, flags, align)
+mcore_asm_named_section (name, flags)
const char *name;
unsigned int flags ATTRIBUTE_UNUSED;
- unsigned int align ATTRIBUTE_UNUSED;
{
fprintf (asm_out_file, "\t.section %s\n", name);
}
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 59c7e25..5e85160 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -116,7 +116,6 @@ static void mips_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
static void mips_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static enum processor_type mips_parse_cpu PARAMS ((const char *));
static void iris6_asm_named_section PARAMS ((const char *,
- unsigned int,
unsigned int));
/* Global variables for machine-dependent things. */
@@ -9754,10 +9753,9 @@ mips_parse_cpu (cpu_string)
/* Output assembly to switch to section NAME with attribute FLAGS. */
static void
-iris6_asm_named_section (name, flags, align)
+iris6_asm_named_section (name, flags)
const char *name;
unsigned int flags;
- unsigned int align;
{
unsigned int sh_type, sh_flags, sh_entsize;
@@ -9785,16 +9783,8 @@ iris6_asm_named_section (name, flags, align)
else
sh_entsize = 0;
- if (align == 0)
- {
- if (flags & SECTION_CODE)
- align = 4;
- else
- align = 8;
- }
-
fprintf (asm_out_file, "\t.section %s,%u,%u,%u,%u\n",
- name, sh_type, sh_flags, sh_entsize, align);
+ name, sh_type, sh_flags, sh_entsize, 0);
}
/* Cover function for UNIQUE_SECTION. */
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 0d74876..838315e 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -139,8 +139,7 @@ static void rs6000_elf_asm_out_constructor PARAMS ((rtx, int));
static void rs6000_elf_asm_out_destructor PARAMS ((rtx, int));
#endif
#ifdef OBJECT_FORMAT_COFF
-static void xcoff_asm_named_section PARAMS ((const char *, unsigned int,
- unsigned int));
+static void xcoff_asm_named_section PARAMS ((const char *, unsigned int));
#endif
/* Default register names. */
@@ -8736,7 +8735,8 @@ rs6000_elf_asm_out_constructor (symbol, priority)
section = buf;
}
- named_section_flags (section, SECTION_WRITE, POINTER_SIZE / BITS_PER_UNIT);
+ named_section_flags (section, SECTION_WRITE);
+ assemble_align (POINTER_SIZE);
if (TARGET_RELOCATABLE)
{
@@ -8766,7 +8766,8 @@ rs6000_elf_asm_out_destructor (symbol, priority)
section = buf;
}
- named_section_flags (section, SECTION_WRITE, POINTER_SIZE / BITS_PER_UNIT);
+ named_section_flags (section, SECTION_WRITE);
+ assemble_align (POINTER_SIZE);
if (TARGET_RELOCATABLE)
{
@@ -8781,10 +8782,9 @@ rs6000_elf_asm_out_destructor (symbol, priority)
#ifdef OBJECT_FORMAT_COFF
static void
-xcoff_asm_named_section (name, flags, align)
+xcoff_asm_named_section (name, flags)
const char *name;
unsigned int flags ATTRIBUTE_UNUSED;
- unsigned int align ATTRIBUTE_UNUSED;
{
fprintf (asm_out_file, "\t.csect %s\n", name);
}
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index d643d92..f8d77d4 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -157,8 +157,7 @@ static rtx mark_constant_pool_use PARAMS ((rtx));
static int sh_valid_decl_attribute PARAMS ((tree, tree, tree, tree));
static void sh_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
static void sh_insert_attributes PARAMS ((tree, tree *));
-static void sh_asm_named_section PARAMS ((const char *, unsigned int,
- unsigned int));
+static void sh_asm_named_section PARAMS ((const char *, unsigned int));
/* Initialize the GCC target structure. */
#undef TARGET_VALID_DECL_ATTRIBUTE
@@ -5560,10 +5559,9 @@ sh_can_redirect_branch (branch1, branch2)
}
static void
-sh_asm_named_section (name, flags, align)
+sh_asm_named_section (name, flags)
const char *name;
unsigned int flags ATTRIBUTE_UNUSED;
- unsigned int align ATTRIBUTE_UNUSED;
{
/* ??? Perhaps we should be using default_coff_asm_named_section. */
fprintf (asm_out_file, "\t.section %s\n", name);
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index d47b985..b0d9ade 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -167,8 +167,7 @@ static void sparc_nonflat_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT,
int));
static void sparc_nonflat_function_prologue PARAMS ((FILE *, HOST_WIDE_INT,
int));
-static void sparc_elf_asm_named_section PARAMS ((const char *, unsigned int,
- unsigned int));
+static void sparc_elf_asm_named_section PARAMS ((const char *, unsigned int));
/* Option handling. */
@@ -8695,10 +8694,9 @@ sparc_add_gc_roots ()
}
static void
-sparc_elf_asm_named_section (name, flags, align)
+sparc_elf_asm_named_section (name, flags)
const char *name;
unsigned int flags;
- unsigned int align ATTRIBUTE_UNUSED;
{
fprintf (asm_out_file, "\t.section\t\"%s\"", name);