2001-08-18 H.J. Lu <hjl@gnu.org>
[deliverable/binutils-gdb.git] / gas / expr.c
index 17ee06eac8485d2fb0a998a18497d16da408be7b..4258868f81c1f23628f844b1c253650e9582b758 100644 (file)
@@ -1,5 +1,6 @@
 /* expr.c -operands, expressions-
-   Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+   Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+   1999, 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -80,9 +81,9 @@ make_expr_symbol (expressionP)
          generic_floating_point_number or generic_bignum, and we are
          going to lose it if we haven't already.  */
       if (expressionP->X_add_number > 0)
-       as_bad (_("bignum invalid; zero assumed"));
+       as_bad (_("bignum invalid"));
       else
-       as_bad (_("floating point number invalid; zero assumed"));
+       as_bad (_("floating point number invalid"));
       zero.X_op = O_constant;
       zero.X_add_number = 0;
       zero.X_unsigned = 0;
@@ -104,7 +105,7 @@ make_expr_symbol (expressionP)
   symbol_set_value_expression (symbolP, expressionP);
 
   if (expressionP->X_op == O_constant)
-    resolve_symbol_value (symbolP, 1);
+    resolve_symbol_value (symbolP);
 
   n = (struct expr_symbol_line *) xmalloc (sizeof *n);
   n->sym = symbolP;
@@ -242,11 +243,12 @@ floating_constant (expressionP)
     {
       if (error_code == ERROR_EXPONENT_OVERFLOW)
        {
-         as_bad (_("bad floating-point constant: exponent overflow, probably assembling junk"));
+         as_bad (_("bad floating-point constant: exponent overflow"));
        }
       else
        {
-         as_bad (_("bad floating-point constant: unknown error code=%d."), error_code);
+         as_bad (_("bad floating-point constant: unknown error code=%d"),
+                 error_code);
        }
     }
   expressionP->X_op = O_big;
@@ -426,7 +428,7 @@ integer_constant (radix, expressionP)
 
          /* Check for 8 digit per word max.  */
          if (ndigit > 8)
-           as_bad (_("A bignum with underscores may not have more than 8 hex digits in any word."));
+           as_bad (_("a bignum with underscores may not have more than 8 hex digits in any word"));
 
          /* Add this chunk to the bignum.
             Shift things down 2 little digits.  */
@@ -449,7 +451,7 @@ integer_constant (radix, expressionP)
       assert (num_little_digits >= 4);
 
       if (num_little_digits != 8)
-       as_bad (_("A bignum with underscores must have exactly 4 words."));
+       as_bad (_("a bignum with underscores must have exactly 4 words"));
 
       /* We might have some leading zeros.  These can be trimmed to give
         us a change to fit this constant into a small number.  */
@@ -572,7 +574,7 @@ integer_constant (radix, expressionP)
              /* Either not seen or not defined.  */
              /* @@ Should print out the original string instead of
                 the parsed number.  */
-             as_bad (_("backw. ref to unknown label \"%d:\", 0 assumed."),
+             as_bad (_("backward ref to unknown label \"%d:\""),
                      (int) number);
              expressionP->X_op = O_constant;
            }
@@ -695,7 +697,7 @@ mri_char_constant (expressionP)
 
   if (i < 0)
     {
-      as_bad (_("Character constant too large"));
+      as_bad (_("character constant too large"));
       i = 0;
     }
 
@@ -809,6 +811,9 @@ operand (expressionP)
 
 #ifdef LITERAL_PREFIXDOLLAR_HEX
     case '$':
+      /* $L is the start of a local label, not a hex constant.  */
+      if (* input_line_pointer == 'L')
+      goto isname;
       integer_constant (16, expressionP);
       break;
 #endif
@@ -1009,7 +1014,7 @@ operand (expressionP)
 #ifdef RELAX_PAREN_GROUPING
          if (c != '(')
 #endif
-           as_bad (_("Missing '%c' assumed"), c == '(' ? ')' : ']');
+           as_bad (_("missing '%c'"), c == '(' ? ')' : ']');
        }
       else
        input_line_pointer++;
@@ -1230,7 +1235,7 @@ operand (expressionP)
              specially in certain contexts.  If a name always has a
              specific value, it can often be handled by simply
              entering it in the symbol table.  */
-         if (md_parse_name (name, expressionP))
+         if (md_parse_name (name, expressionP, &c))
            {
              *input_line_pointer = c;
              break;
@@ -1311,7 +1316,7 @@ operand (expressionP)
          if (expressionP->X_op == O_absent)
            {
              ++input_line_pointer;
-             as_bad (_("Bad expression"));
+             as_bad (_("bad expression"));
              expressionP->X_op = O_constant;
              expressionP->X_add_number = 0;
            }
@@ -1455,7 +1460,7 @@ static const operatorT op_encoding[256] = {
    0   operand, (expression)
    1   ||
    2   &&
-   3   = <> < <= >= >
+   3   == <> < <= >= >
    4   + -
    5   used for * / % in MRI mode
    6   & ^ ! |
This page took 0.024622 seconds and 4 git commands to generate.