]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Append # to end of the label inside NAME as opposed to just the end of NAME.
authorNick Clifton <nickc@cambridge.redhat.com>
Sat, 7 Jul 2001 15:02:05 +0000 (15:02 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Sat, 7 Jul 2001 15:02:05 +0000 (15:02 +0000)
From-SVN: r43837

gcc/ChangeLog
gcc/config/ia64/sysv4.h

index c263e2f7c71893169c8abb8f70386f0b765e50df..bc2152cfcd59ba54d6b3453969c9977ba590ccfd 100644 (file)
@@ -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.
index 99f561cb7abfb4f49011a672741a8d366983ad55..02da9e47ebcf3c6d9dbcf7d83e411f42dcac03d5 100644 (file)
@@ -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.  */