* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160058
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
{
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[] =
{
int c;
while ((c = *name++) != '\0')
- if (! ISIDNUM (c) && c != '.' && c != '$')
+ if (! ISIDNUM (c)
+ && c != '.' && c != '$' && c != '_' )
return 1;
return 0;
}
++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. */
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);
}
#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, \
} 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
#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", \
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)))
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)))
#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); \