aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iains@gcc.gnu.org>2010-05-30 16:43:45 +0000
committerIain Sandoe <iains@gcc.gnu.org>2010-05-30 16:43:45 +0000
commit83bf7f5eb6e8507d1c8fad3e19c1fff801f19b37 (patch)
tree274537cb853d4c6d03f645037a0bd59508744748 /gcc
parent18fc5f4404ceabb11f7be632cca8fd0d23598585 (diff)
downloadgcc-83bf7f5eb6e8507d1c8fad3e19c1fff801f19b37.zip
gcc-83bf7f5eb6e8507d1c8fad3e19c1fff801f19b37.tar.gz
gcc-83bf7f5eb6e8507d1c8fad3e19c1fff801f19b37.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/darwin.c11
-rw-r--r--gcc/config/darwin.h4
-rw-r--r--gcc/config/darwin9.h2
-rw-r--r--gcc/config/i386/darwin.h4
-rw-r--r--gcc/config/rs6000/darwin.h2
6 files changed, 26 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ac415db..bf40f35 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+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
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index eba0329..9a9dde1 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -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);
}
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index a0a4974..149ef4a 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -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
diff --git a/gcc/config/darwin9.h b/gcc/config/darwin9.h
index a03e772..7a07374 100644
--- a/gcc/config/darwin9.h
+++ b/gcc/config/darwin9.h
@@ -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", \
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
index f2c8984..d26ef2d 100644
--- a/gcc/config/i386/darwin.h
+++ b/gcc/config/i386/darwin.h
@@ -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)))
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index 077f74b..98d44cf 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -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); \