m68k.c (print_operand_address): When printing a SYMBOL_REF that ends in `.<letter...
authorAndreas Schwab <schwab@issan.cs.uni-dortmund.de>
Wed, 3 Feb 1999 02:03:23 +0000 (02:03 +0000)
committerAndreas Schwab <schwab@gcc.gnu.org>
Wed, 3 Feb 1999 02:03:23 +0000 (02:03 +0000)
* config/m68k/m68k.c (print_operand_address): When printing a
SYMBOL_REF that ends in `.<letter>' put parentheses around it.

From-SVN: r25000

gcc/ChangeLog
gcc/config/m68k/m68k.c

index 68b333844ce0ccf6688a3b92f2f6adf468294d62..d2fb5d5cb70a651f3693f9595dc11a0403ae8f5b 100644 (file)
@@ -1,3 +1,8 @@
+Wed Feb  3 10:59:07 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+
+       * config/m68k/m68k.c (print_operand_address): When printing a
+       SYMBOL_REF that ends in `.<letter>' put parentheses around it.
+
 Tue Feb  2 23:38:35 1999  David O'Brien <obrien@FreeBSD.org>
 
        * i386/freebsd*.h now allows '$' in label names and does not use the
index 244fa7fbbcb02303eba1f0cf98b0442ffadfc5f6..3dc331fd615ac0b0192f4d9612a3131eede5fba4 100644 (file)
@@ -3176,7 +3176,19 @@ print_operand_address (file, addr)
          }
        else
          {
-           output_addr_const (file, addr);
+           /* Special case for SYMBOL_REF if the symbol name ends in
+              `.<letter>', this can be mistaken as a size suffix.  Put
+              the name in parentheses.  */
+           if (GET_CODE (addr) == SYMBOL_REF
+               && strlen (XSTR (addr, 0)) > 2
+               && XSTR (addr, 0)[strlen (XSTR (addr, 0)) - 2] == '.')
+             {
+               putc ('(', file);
+               output_addr_const (file, addr);
+               putc (')', file);
+             }
+           else
+             output_addr_const (file, addr);
          }
        break;
     }