2005-12-12 Paul Brook <paul@codesourcery.com>
[deliverable/binutils-gdb.git] / gas / expr.c
index 32de0f7394b1f7287c92b2dc9d540913fecdeb78..c601b0af6986e89312ffcc6c2e018f2b328003ef 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;
@@ -1092,10 +1095,10 @@ operand (expressionS *expressionP, enum expr_mode mode)
       if (! flag_m68k_mri)
        goto de_fault;
 #endif
-      if (flag_m68k_mri && hex_p (*input_line_pointer))
+      if (DOLLAR_AMBIGU && hex_p (*input_line_pointer))
        {
-         /* In MRI mode, '$' is also used as the prefix for a
-            hexadecimal constant.  */
+         /* In MRI mode and on Z80, '$' is also used as the prefix
+            for a hexadecimal constant.  */
          integer_constant (16, expressionP);
          break;
        }
@@ -1387,6 +1390,9 @@ clean_up_expression (expressionS *expressionP)
 
 #undef __
 #define __ O_illegal
+#ifndef O_SINGLE_EQ
+#define O_SINGLE_EQ O_illegal
+#endif
 
 /* Maps ASCII -> operators.  */
 static const operatorT op_encoding[256] = {
@@ -1396,7 +1402,7 @@ static const operatorT op_encoding[256] = {
   __, O_bit_or_not, __, __, __, O_modulus, O_bit_and, __,
   __, __, O_multiply, O_add, __, O_subtract, __, O_divide,
   __, __, __, __, __, __, __, __,
-  __, __, __, __, O_lt, __, O_gt, __,
+  __, __, __, __, O_lt, O_SINGLE_EQ, O_gt, __,
   __, __, __, __, __, __, __, __,
   __, __, __, __, __, __, __, __,
   __, __, __, __, __, __, __, __,
This page took 0.02313 seconds and 4 git commands to generate.