]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2010-05-30 Iain Sandoe <iains@gcc.gnu.org>
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 May 2010 16:43:45 +0000 (16:43 +0000)
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 May 2010 16:43:45 +0000 (16:43 +0000)
    * 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

gcc/ChangeLog
gcc/config/darwin.c
gcc/config/darwin.h
gcc/config/darwin9.h
gcc/config/i386/darwin.h
gcc/config/rs6000/darwin.h

index ac415db4f2f843656c2dece4889e6ad11097155c..bf40f35f11a2b0529078e5fec7c22046c7efe09a 100644 (file)
@@ -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
index eba0329910ee8c49e5c04205f5828f9bc0642146..9a9dde160c597d2393b22a66b6b95deedd552865 100644 (file)
@@ -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);
 }
index a0a4974c38a3c6eadf4caa8a7a01dc7c4b2bf550..149ef4a697289c2fe0e0cffdf2070cdf51b7f47e 100644 (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
index a03e77271ebdd4c8a17111410e312ca407b7e132..7a073742cb634752b683a2dcf2fe24f3d356dbd2 100644 (file)
@@ -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",           \
index f2c8984ab8486e86cf494c879f3177eaa99206b9..d26ef2d422ddb45930bc42d998b2652acb542da7 100644 (file)
@@ -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)))
 
index 077f74b08db73d35b987d3da56e80c9ab5094c21..98d44cfbde55dcdc01c3318d82baa3f0583c49e7 100644 (file)
 #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);  \