Commit 83bf7f5e by Iain Sandoe

darwin.c (output_objc_section_asm_op): Add comment.

2010-05-30  Iain Sandoe  <iains@gcc.gnu.org>

	    * config/darwin.c (output_objc_section_asm_op): Add comment.
	    (name_needs_quotes): Add '_' to list of valid comment chars.
	    (machopic_output_function_base_name): Remove unneeded quotes.
	    (darwin_encode_section_info): Adjust asm whitespace.
	    * config/i386/darwin.h (ASM_OUTPUT_COMMON): Adjust asm tabs.
	    (ASM_OUTPUT_LOCAL): Ditto.
	    * config/rs6000/darwin.h (ASM_OUTPUT_COMMON): Ditto.
	    * config/darwin.h (GLOBAL_ASM_OP): Ditto.
	    * config/darwin9.h (ASM_OUTPUT_ALIGNED_COMMON): Ditto.

From-SVN: r160058
parent 18fc5f44
2010-05-30 Iain Sandoe <iains@gcc.gnu.org>
* config/darwin.c (output_objc_section_asm_op): Add comment.
(name_needs_quotes): Add '_' to list of valid comment chars.
(machopic_output_function_base_name): Remove unneeded quotes.
(darwin_encode_section_info): Adjust asm whitespace.
* config/i386/darwin.h (ASM_OUTPUT_COMMON): Adjust asm tabs.
(ASM_OUTPUT_LOCAL): Ditto.
* config/rs6000/darwin.h (ASM_OUTPUT_COMMON): Ditto.
* config/darwin.h (GLOBAL_ASM_OP): Ditto.
* config/darwin9.h (ASM_OUTPUT_ALIGNED_COMMON): Ditto.
2010-05-30 Eric Botcazou <ebotcazou@adacore.com>
* config/rs6000/rs6000.c (rs6000_output_function_entry): Use
......
......@@ -92,6 +92,10 @@ output_objc_section_asm_op (const void *directive)
{
static bool been_here = false;
/* The NeXT ObjC Runtime requires these sections to be present and in
order in the object. The code below implements this by emitting
a section header for each ObjC section the first time that an ObjC
section is requested. */
if (! been_here)
{
static const enum darwin_section_enum tomark[] =
......@@ -152,7 +156,8 @@ name_needs_quotes (const char *name)
{
int c;
while ((c = *name++) != '\0')
if (! ISIDNUM (c) && c != '.' && c != '$')
if (! ISIDNUM (c)
&& c != '.' && c != '$' && c != '_' )
return 1;
return 0;
}
......@@ -305,7 +310,7 @@ machopic_output_function_base_name (FILE *file)
++current_pic_label_num;
function_base_func_name = current_name;
}
fprintf (file, "\"L%011d$pb\"", current_pic_label_num);
fprintf (file, "L%011d$pb", current_pic_label_num);
}
/* The suffix attached to non-lazy pointer symbols. */
......@@ -1076,7 +1081,7 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
void
darwin_mark_decl_preserved (const char *name)
{
fprintf (asm_out_file, ".no_dead_strip ");
fprintf (asm_out_file, "\t.no_dead_strip ");
assemble_name (asm_out_file, name);
fputc ('\n', asm_out_file);
}
......
......@@ -725,7 +725,7 @@ int darwin_label_is_anonymous_local_objc_name (const char *name);
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
do { \
unsigned HOST_WIDE_INT _new_size = SIZE; \
fputs (".lcomm ", (FILE)); \
fputs ("\t.lcomm ", (FILE)); \
assemble_name ((FILE), (NAME)); \
if (_new_size == 0) _new_size = 1; \
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", _new_size, \
......@@ -793,7 +793,7 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS];
} while (0)
/* Globalizing directive for a label. */
#define GLOBAL_ASM_OP ".globl "
#define GLOBAL_ASM_OP "\t.globl "
#define TARGET_ASM_GLOBALIZE_LABEL darwin_globalize_label
/* Emit an assembler directive to set visibility for a symbol. Used
......
......@@ -51,7 +51,7 @@ along with GCC; see the file COPYING3. If not see
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
do { \
unsigned HOST_WIDE_INT _new_size = (SIZE); \
fprintf ((FILE), ".comm "); \
fprintf ((FILE), "\t.comm "); \
assemble_name ((FILE), (NAME)); \
if (_new_size == 0) _new_size = 1; \
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
......
......@@ -209,7 +209,7 @@ along with GCC; see the file COPYING3. If not see
to define a global common symbol. */
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
( fputs (".comm ", (FILE)), \
( fputs ("\t.comm ", (FILE)), \
assemble_name ((FILE), (NAME)), \
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", (ROUNDED)))
......@@ -217,7 +217,7 @@ along with GCC; see the file COPYING3. If not see
to define a local common symbol. */
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
( fputs (".lcomm ", (FILE)), \
( fputs ("\t.lcomm ", (FILE)), \
assemble_name ((FILE), (NAME)), \
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", (ROUNDED)))
......
......@@ -247,7 +247,7 @@
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
do { \
unsigned HOST_WIDE_INT _new_size = SIZE; \
fputs (".comm ", (FILE)); \
fputs ("\t.comm ", (FILE)); \
RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
if (_new_size == 0) _new_size = 1; \
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", _new_size); \
......
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