OSDN Git Service

* expr.c (integer_constant): Match only 'B' as binary suffix if
authoramodra <amodra>
Sun, 6 Nov 2005 23:04:10 +0000 (23:04 +0000)
committeramodra <amodra>
Sun, 6 Nov 2005 23:04:10 +0000 (23:04 +0000)
        NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB.  Allow both 'b' and 'B'
        otherwise.

gas/ChangeLog
gas/expr.c

index 9313163..5e503fe 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-07  Arnold Metselaar <arnold.metselaar@planet.nl>
+
+       * expr.c (integer_constant): Match only 'B' as binary suffix if
+        NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB.  Allow both 'b' and 'B'
+        otherwise.
+
 2005-11-04  Alexandre Oliva  <aoliva@redhat.com>
 
        * read.c (s_weakref): Do not permit redefinitions.
index 32de0f7..0664e29 100644 (file)
@@ -301,7 +301,10 @@ integer_constant (int radix, expressionS *expressionP)
        {
          c = *--suffix;
          c = TOUPPER (c);
-         if (c == 'B')
+         /* If we have both NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB,
+            we distinguish between 'B' and 'b'.  This is the case for
+            Z80.  */
+         if ((NUMBERS_WITH_SUFFIX && LOCAL_LABELS_FB ? *suffix : c) == 'B')
            radix = 2;
          else if (c == 'D')
            radix = 10;