pa.c (hppa_encode_label): Don't drop '*' from function labels.
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>
Mon, 30 Sep 2002 19:52:45 +0000 (19:52 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Mon, 30 Sep 2002 19:52:45 +0000 (19:52 +0000)
* pa.c (hppa_encode_label): Don't drop '*' from function labels.
(pa_strip_name_encoding): Strip '@' and '*', in that order.
* pa.h (ASM_OUTPUT_LABELREF): Output user_label_prefix except when
there is a '*' prefix in NAME.

From-SVN: r57664

gcc/ChangeLog
gcc/config/pa/pa.c
gcc/config/pa/pa.h

index ef6c2cac0c9de4bdfa39d934a13638e8cd5b3507..3212d1bbad9ce7e9df44744df3e2f6113496d3e4 100644 (file)
@@ -1,3 +1,10 @@
+2002-09-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * pa.c (hppa_encode_label): Don't drop '*' from function labels.
+       (pa_strip_name_encoding): Strip '@' and '*', in that order.
+       * pa.h (ASM_OUTPUT_LABELREF): Output user_label_prefix except when
+       there is a '*' prefix in NAME.
+
 Mon Sep 30 21:33:23 CEST 2002  Jan Hubicka  <jh@suse.cz>
 
        * reload.c (push_reload): Handle subregs and secondary memory.
index 98944da118120bb94fa6e9adaa4c6c5adec0ea3f..1aae00d3ec608221fa1ccedbf7f6f37fca2f5c53 100644 (file)
@@ -6487,11 +6487,6 @@ hppa_encode_label (sym)
   char *newstr, *p;
 
   p = newstr = alloca (len + 1);
-  if (str[0] == '*')
-    {
-      str++;
-      len--;
-    }
   *p++ = '@';
   strcpy (p, str);
 
@@ -6523,7 +6518,9 @@ static const char *
 pa_strip_name_encoding (str)
      const char *str;
 {
-  return str + (*str == '*' || *str == '@');
+  str += (*str == '@');
+  str += (*str == '*');
+  return str;
 }
 
 int
index 0f18ff07a6ee590d571a9e90dd645df703f2907c..a6dbcf1f939d1adc48f57ea0bca0292cb3163f75 100644 (file)
@@ -1688,7 +1688,16 @@ do {                                                                     \
    `assemble_name' uses this.  */
 
 #define ASM_OUTPUT_LABELREF(FILE,NAME) \
-  fprintf ((FILE), "%s", (NAME) + (FUNCTION_NAME_P (NAME) ? 1 : 0))
+  do {                                 \
+    const char *xname = (NAME);                \
+    if (FUNCTION_NAME_P (NAME))                \
+      xname += 1;                      \
+    if (xname[0] == '*')               \
+      xname += 1;                      \
+    else                               \
+      fputs (user_label_prefix, FILE); \
+    fputs (xname, FILE);               \
+  } while (0)
 
 /* This is how to output an internal numbered label where
    PREFIX is the class of label and NUM is the number within the class.  */