OSDN Git Service

* pa.c (hppa_encode_label): Don't drop '*' from function labels.
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Sep 2002 19:52:45 +0000 (19:52 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Sep 2002 19:52:45 +0000 (19:52 +0000)
(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.

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

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

index ef6c2ca..3212d1b 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.
 Mon Sep 30 21:33:23 CEST 2002  Jan Hubicka  <jh@suse.cz>
 
        * reload.c (push_reload): Handle subregs and secondary memory.
index 98944da..1aae00d 100644 (file)
@@ -6487,11 +6487,6 @@ hppa_encode_label (sym)
   char *newstr, *p;
 
   p = newstr = alloca (len + 1);
   char *newstr, *p;
 
   p = newstr = alloca (len + 1);
-  if (str[0] == '*')
-    {
-      str++;
-      len--;
-    }
   *p++ = '@';
   strcpy (p, str);
 
   *p++ = '@';
   strcpy (p, str);
 
@@ -6523,7 +6518,9 @@ static const char *
 pa_strip_name_encoding (str)
      const char *str;
 {
 pa_strip_name_encoding (str)
      const char *str;
 {
-  return str + (*str == '*' || *str == '@');
+  str += (*str == '@');
+  str += (*str == '*');
+  return str;
 }
 
 int
 }
 
 int
index 0f18ff0..a6dbcf1 100644 (file)
@@ -1688,7 +1688,16 @@ do {                                                                     \
    `assemble_name' uses this.  */
 
 #define ASM_OUTPUT_LABELREF(FILE,NAME) \
    `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.  */
 
 /* This is how to output an internal numbered label where
    PREFIX is the class of label and NUM is the number within the class.  */