This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Enable -fuse-linker-plugin by default when possible, take 2


On 11/30/2010 08:10 PM, Dave Korn wrote:
   I haven't thought of anything simpler than reworking ASM_OUTPUT_LABELREF
into a new form that generates the label in a memory buffer yet.  (Well, or we
could intercept asm_fprintf and grab it there, but that sounds horribly ugly...)

Can we assume ASM_OUTPUT_LABELREF only does replacement of a prefix with another? That's even simpler than generating in a buffer,


make_labelref_prefix (const char **name, const char **prefix);

#define ASM_OUTPUT_LABELREF(STREAM, NAME) do { \
  const char *_name = (NAME); \
  const char *_prefix = NULL; \
  targetm.make_labelref_prefix (&_name, &_prefix); \
  if (_prefix) \
    asm_fprintf ("%s", _prefix); \
  asm_fprintf ("%s", _name); \
} while(0)

BTW, some targets such as alpha handle '*' twice, once in assemble_name_raw and once in ASM_OUTPUT_LABELREF.

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]