[PATCH] rs6000/sysv4.h: Add missing ASM_NAME_TO_STRING macro
Jeffrey A Law
law@upchuck.cygnus.com
Mon May 31 20:56:00 GMT 1999
In message < 99052521503200.00708@ns1102.munich.netsurf.de >you write:
> Sorry, I meant the comparison in ASM_NAME_TO_STRING and I would think somet
> hing
> like that is needed:
>
> {
> char *realname;
>
> STRIP_NAME_ENCODING (realname, NAME);
> if (strcmp (realname, NAME) !=0)
> dyn_string_append (STR, realname)
> else
> {
> dyn_string_append (STR, user_label_prefix)
> dyn_string_append (STR, realname);
> }
> }
>
> But then maybe the '*' is enough to decide if user_label_prefix needs to
> prepended or not? I don't know all the possible encodings and their meaning
> with respect to user_label_prefix on all platforms (eg. I know that ppc/aix
> appends stuff to realname).
If the string starts with a '*' then the '*' should be stripped and the
rest of the string output without further processing (see
ASM_GENERATE_INTERNAL_LABEL in tm.texi).
Else we need to apply STRIP_NAME_ENCODING, then emit the user_label_prefix
and the stripped name.
char *realname;
STRIP_NAME_ENCODING (realname, NAME);
if ((NAME[0] == '*'))
dyn_string_append (STR, NAME[1])
else
{
dyn_string_append (STR, user_label_prefix)
dyn_string_append (STR, realname);
}
}
More information about the Gcc-patches
mailing list