Commit 890f9edf by Olivier Hainque Committed by Olivier Hainque

xcoff.h (XCOFF_CSECT_DEFAULT_ALIGNMENT_STR): New internal macro.

2007-08-31  Olivier Hainque  <hainque@adacore.com>

	* config/rs6000/xcoff.h (XCOFF_CSECT_DEFAULT_ALIGNMENT_STR): New
	internal macro. Default alignment factor for csect directives, chosen
	to match what BIGGEST_ALIGNMENT allows.
	(DATA_SECTION_ASM_OP): Use it.
	* config/rs6000/rs6000.c
	(rs6000_xcoff_output_readonly_section_asm_op):
	Use XCOFF_CSECT_DEFAULT_ALIGNMENT_STR.
	(rs6000_xcoff_output_readwrite_section_asm_op): Likewise.

From-SVN: r127956
parent b420396f
2007-08-31 Olivier Hainque <hainque@adacore.com> 2007-08-31 Olivier Hainque <hainque@adacore.com>
* config/rs6000/xcoff.h (XCOFF_CSECT_DEFAULT_ALIGNMENT_STR): New
internal macro. Default alignment factor for csect directives, chosen
to match what BIGGEST_ALIGNMENT allows.
(DATA_SECTION_ASM_OP): Use it.
* config/rs6000/rs6000.c
(rs6000_xcoff_output_readonly_section_asm_op):
Use XCOFF_CSECT_DEFAULT_ALIGNMENT_STR.
(rs6000_xcoff_output_readwrite_section_asm_op): Likewise.
2007-08-31 Olivier Hainque <hainque@adacore.com>
* dbxout.c (dbxout_block): Move declaration within the first * dbxout.c (dbxout_block): Move declaration within the first
#if defined (DBX_DEBUGGING_INFO) block. Rearrange another such #if defined (DBX_DEBUGGING_INFO) block. Rearrange another such
block to include the definition, together with the associated block to include the definition, together with the associated
......
...@@ -20205,8 +20205,9 @@ rs6000_xcoff_asm_globalize_label (FILE *stream, const char *name) ...@@ -20205,8 +20205,9 @@ rs6000_xcoff_asm_globalize_label (FILE *stream, const char *name)
static void static void
rs6000_xcoff_output_readonly_section_asm_op (const void *directive) rs6000_xcoff_output_readonly_section_asm_op (const void *directive)
{ {
fprintf (asm_out_file, "\t.csect %s[RO],3\n", fprintf (asm_out_file, "\t.csect %s[RO],%s\n",
*(const char *const *) directive); *(const char *const *) directive,
XCOFF_CSECT_DEFAULT_ALIGNMENT_STR);
} }
/* Likewise for read-write sections. */ /* Likewise for read-write sections. */
...@@ -20214,8 +20215,9 @@ rs6000_xcoff_output_readonly_section_asm_op (const void *directive) ...@@ -20214,8 +20215,9 @@ rs6000_xcoff_output_readonly_section_asm_op (const void *directive)
static void static void
rs6000_xcoff_output_readwrite_section_asm_op (const void *directive) rs6000_xcoff_output_readwrite_section_asm_op (const void *directive)
{ {
fprintf (asm_out_file, "\t.csect %s[RW],3\n", fprintf (asm_out_file, "\t.csect %s[RW],%s\n",
*(const char *const *) directive); *(const char *const *) directive,
XCOFF_CSECT_DEFAULT_ALIGNMENT_STR);
} }
/* A get_unnamed_section callback, used for switching to toc_section. */ /* A get_unnamed_section callback, used for switching to toc_section. */
......
...@@ -60,6 +60,10 @@ ...@@ -60,6 +60,10 @@
#define MAX_OFILE_ALIGNMENT 32768 #define MAX_OFILE_ALIGNMENT 32768
/* Default alignment factor for csect directives, chosen to honor
BIGGEST_ALIGNMENT. */
#define XCOFF_CSECT_DEFAULT_ALIGNMENT_STR "4"
/* Return nonzero if this entry is to be written into the constant /* Return nonzero if this entry is to be written into the constant
pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF
or a CONST containing one of them. If -mfp-in-toc (the default), or a CONST containing one of them. If -mfp-in-toc (the default),
...@@ -277,9 +281,10 @@ ...@@ -277,9 +281,10 @@
/* Output before instructions. */ /* Output before instructions. */
#define TEXT_SECTION_ASM_OP "\t.csect .text[PR]" #define TEXT_SECTION_ASM_OP "\t.csect .text[PR]"
/* Output before writable data. /* Output before writable data. */
Align entire section to BIGGEST_ALIGNMENT. */ #define DATA_SECTION_ASM_OP \
#define DATA_SECTION_ASM_OP "\t.csect .data[RW],3" "\t.csect .data[RW]," XCOFF_CSECT_DEFAULT_ALIGNMENT_STR
/* Define to prevent DWARF2 unwind info in the data section rather /* Define to prevent DWARF2 unwind info in the data section rather
than in the .eh_frame section. We do this because the AIX linker than in the .eh_frame section. We do this because the AIX linker
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment