(hppa_encode_label): Change function name encoding to preserve leading '*' if there...
authorTimothy Moore <moore@gnu.org>
Mon, 26 Oct 1992 21:23:29 +0000 (21:23 +0000)
committerTimothy Moore <moore@gnu.org>
Mon, 26 Oct 1992 21:23:29 +0000 (21:23 +0000)
(hppa_encode_label): Change function name encoding to
        preserve leading '*' if there is one.
        (function_label_operand): Use FUNCTION_NAME_P macro.

From-SVN: r2618

gcc/config/pa/pa.c

index 9cb4830..8421c83 100644 (file)
@@ -2470,8 +2470,10 @@ hppa_encode_label (sym)
   int len = strlen (str);
   char *newstr = obstack_alloc (saveable_obstack, len + 2) ;
 
+  if (str[0] == '*')
+    *newstr++ = *str++;
   strcpy (newstr + 1, str);
-  newstr[0] = '@';
+  *newstr = '@';
   XSTR (sym,0) = newstr;
 }
   
@@ -2480,5 +2482,5 @@ function_label_operand  (op, mode)
      rtx op;
      enum machine_mode mode;
 {
-  return GET_CODE (op) == SYMBOL_REF && (XSTR (op, 0))[0] == '@';
+  return GET_CODE (op) == SYMBOL_REF && FUNCTION_NAME_P (XSTR (op, 0));
 }