diff options
author | Nick Clifton <nickc@cambridge.redhat.com> | 2001-07-07 15:02:05 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2001-07-07 15:02:05 +0000 |
commit | 13daf3c1c5ed80d12db718cf3590a98792e7ecb4 (patch) | |
tree | 81169d0ea7f7cc74ddf4465fb8911acf231b567a /gcc | |
parent | 3b1e7311a8f56d354f4a62a34217d80fa86b3867 (diff) | |
download | gcc-13daf3c1c5ed80d12db718cf3590a98792e7ecb4.zip gcc-13daf3c1c5ed80d12db718cf3590a98792e7ecb4.tar.gz gcc-13daf3c1c5ed80d12db718cf3590a98792e7ecb4.tar.bz2 |
Append # to end of the label inside NAME as opposed to just the end of NAME.
From-SVN: r43837
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/ia64/sysv4.h | 37 |
2 files changed, 32 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c263e2f..bc2152c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-07-07 Nick Clifton <nickc@cambridge.redhat.com> + + * 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 <neil@daikokuya.demon.co.uk> * 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 99f561c..02da9e4 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. */ |