2003-07-14 Richard Sandiford <rsandifo@redhat.com>
+ * config/mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Use
+ mips_output_aligned_bss.
+ * config/mips/linux.h: Likewise.
+ * config/mips/mips-protos.h (mips_output_aligned_bss): Declare.
+ * config/mips/mips.c (mips_output_aligned_bss): New function.
+
* config/mips/elf.h (DBX_DEBUGGING_INFO): Delete.
* config/mips/elf64.h: Likewise.
#define BSS_SECTION_ASM_OP "\t.section\t.bss"
#endif
-/* Like `ASM_OUTPUT_BSS' except takes the required alignment as a
- separate, explicit argument. If you define this macro, it is used
- in place of `ASM_OUTPUT_BSS', and gives you more flexibility in
- handling the required alignment of the variable. The alignment is
- specified as the number of bits.
-
- Try to use function `asm_output_aligned_bss' defined in file
- `varasm.c' when defining this macro. */
#ifndef ASM_OUTPUT_ALIGNED_BSS
-#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
-do { \
- if (SIZE > 0 && SIZE <= (unsigned HOST_WIDE_INT)mips_section_threshold)\
- named_section (0, ".sbss", 0); \
- else \
- bss_section (); \
- ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \
- last_assemble_variable_decl = DECL; \
- ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL); \
- ASM_OUTPUT_SKIP (FILE, SIZE ? SIZE : 1); \
-} while (0)
+#define ASM_OUTPUT_ALIGNED_BSS mips_output_aligned_bss
#endif
#undef ASM_DECLARE_OBJECT_NAME
used. */
#define BSS_SECTION_ASM_OP "\t.section\t.bss"
-/* Like `ASM_OUTPUT_BSS' except takes the required alignment as a
- separate, explicit argument. If you define this macro, it is used
- in place of `ASM_OUTPUT_BSS', and gives you more flexibility in
- handling the required alignment of the variable. The alignment is
- specified as the number of bits.
-
- Try to use function `asm_output_aligned_bss' defined in file
- `varasm.c' when defining this macro. */
-#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
-do { \
- if (SIZE > 0 && (long)(SIZE) <= mips_section_threshold) \
- named_section (0, ".sbss", 0); \
- else \
- bss_section (); \
- ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \
- last_assemble_variable_decl = DECL; \
- ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL); \
- ASM_OUTPUT_SKIP (FILE, SIZE ? SIZE : 1); \
-} while (0)
+#define ASM_OUTPUT_ALIGNED_BSS mips_output_aligned_bss
#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
tree));
extern void mips_finish_declare_object PARAMS ((FILE *, tree,
int, int));
+extern void mips_output_aligned_bss
+ PARAMS ((FILE *, tree, const char *,
+ unsigned HOST_WIDE_INT, int));
extern void mips_expand_epilogue PARAMS ((int));
extern void mips_expand_prologue PARAMS ((void));
extern void mips_output_filename PARAMS ((FILE *, const char *));
ASM_COMMENT_START,
mips_section_threshold, mips_arch_info->name, mips_isa);
}
+
+#ifdef BSS_SECTION_ASM_OP
+/* Implement ASM_OUTPUT_ALIGNED_BSS. This differs from the default only
+ in the use of sbss. */
+
+void
+mips_output_aligned_bss (stream, decl, name, size, align)
+ FILE *stream;
+ tree decl;
+ const char *name;
+ unsigned HOST_WIDE_INT size;
+ int align;
+{
+ extern tree last_assemble_variable_decl;
+
+ if (mips_in_small_data_p (decl))
+ named_section (0, ".sbss", 0);
+ else
+ bss_section ();
+ ASM_OUTPUT_ALIGN (stream, floor_log2 (align / BITS_PER_UNIT));
+ last_assemble_variable_decl = decl;
+ ASM_DECLARE_OBJECT_NAME (stream, name, decl);
+ ASM_OUTPUT_SKIP (stream, size != 0 ? size : 1);
+}
+#endif
\f
/* If we are optimizing the global pointer, emit the text section now and any
small externs which did not have .comm, etc that are needed. Also, give a