]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
darwin, powerpc - adjust the formatting of picbase labels
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 May 2019 19:01:29 +0000 (19:01 +0000)
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 May 2019 19:01:29 +0000 (19:01 +0000)
The rest of the Darwin ports now emit Lnnn$pb as the picbase
lable instead of the ancient (and hard to read) "L0000000nnn$pb".

This just updates this part of the rs6000 port, NFC intended.

2019-05-17  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/rs6000.c (machopic_output_stub): Adjust the
formatting of picbase labels to match other ports.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271342 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 5268c3ddfeac2dfb335520ff96a011e7a6f35c2a..5fc97248662df5d14776bcab9bf194a766b83704 100644 (file)
@@ -1,7 +1,12 @@
+2019-05-17  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * config/rs6000/rs6000.c (machopic_output_stub): Adjust the
+       formating of picbase labels to match other ports.
+
 2019-05-17  Iain Sandoe  <iain@sandoe.co.uk>
 
        * config/rs6000/rs6000.c (macho_branch_islands): Fix bad indent
-       on the generted code.
+       in the generated code.
 
 2019-05-16  Martin Sebor  <msebor@redhat.com>
 
index 155bc083ab70192f17eb358fae4f605149dc96b5..7f7b1674c1a832931778d87c6c5953f7fb49a244 100644 (file)
@@ -33039,7 +33039,7 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub)
   unsigned int length;
   char *symbol_name, *lazy_ptr_name;
   char *local_label_0;
-  static int label = 0;
+  static unsigned label = 0;
 
   /* Lose our funky encoding stuff so it doesn't contaminate the stub.  */
   symb = (*targetm.strip_name_encoding) (symb);
@@ -33065,8 +33065,8 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub)
       fprintf (file, "\t.indirect_symbol %s\n", symbol_name);
 
       label++;
-      local_label_0 = XALLOCAVEC (char, sizeof ("\"L00000000000$spb\""));
-      sprintf (local_label_0, "\"L%011d$spb\"", label);
+      local_label_0 = XALLOCAVEC (char, 16);
+      sprintf (local_label_0, "L%u$spb", label);
 
       fprintf (file, "\tmflr r0\n");
       if (TARGET_LINK_STACK)