From 13daf3c1c5ed80d12db718cf3590a98792e7ecb4 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Sat, 7 Jul 2001 15:02:05 +0000 Subject: [PATCH] Append # to end of the label inside NAME as opposed to just the end of NAME. From-SVN: r43837 --- gcc/ChangeLog | 5 +++++ gcc/config/ia64/sysv4.h | 37 +++++++++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c263e2f7c71..bc2152cfcd5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-07-07 Nick Clifton + + * config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Append # to end + of the label inside NAME as opposed to just the end of NAME. + 2001-07-07 Neil Booth * config/alpha/alpha-protos.h (vms_valid_decl_attribute_p): Delete. diff --git a/gcc/config/ia64/sysv4.h b/gcc/config/ia64/sysv4.h index 99f561cb7ab..02da9e47ebc 100644 --- a/gcc/config/ia64/sysv4.h +++ b/gcc/config/ia64/sysv4.h @@ -54,18 +54,35 @@ do { \ /* The # tells the Intel assembler that this is not a register name. However, we can't emit the # in a label definition, so we set a variable - in ASM_OUTPUT_LABEL to control whether we want the postfix here or not. */ + in ASM_OUTPUT_LABEL to control whether we want the postfix here or not. + We append the # to the label name, but since NAME can be an expression + we have to scan it for a non-label character and insert the # there. */ #undef ASM_OUTPUT_LABELREF -#define ASM_OUTPUT_LABELREF(STREAM, NAME) \ -do \ - { \ - const char *real_name; \ - STRIP_NAME_ENCODING (real_name, NAME); \ - asm_fprintf (STREAM, "%U%s%s", real_name, \ - (ia64_asm_output_label ? "" : "#")); \ - } \ -while (0) +#define ASM_OUTPUT_LABELREF(STREAM, NAME) \ + do \ + { \ + const char * real_name; \ + const char * name_end; \ + \ + STRIP_NAME_ENCODING (real_name, NAME); \ + name_end = strchr (real_name, '+'); \ + \ + if (name_end) \ + * name_end = 0; \ + \ + asm_fprintf (STREAM, "%U%s", real_name); \ + \ + if (ia64_asm_output_label) \ + asm_fprintf (STREAM, "#"); \ + \ + if (name_end) \ + { \ + * name_end = '+'; \ + asm_fprintf (STREAM, name_end); \ + } \ + } \ + while (0) /* Intel assembler requires both flags and type if declaring a non-predefined section. */ -- 2.30.2