rl78: relaxation fixes
[deliverable/binutils-gdb.git] / gas / read.c
index 978cd3e985534438ad163b22184b3d27dce8a41c..1718aaa4d63fa53a612fa146b87bf9aeb724be40 100644 (file)
@@ -41,7 +41,7 @@
 #include "wchar.h"
 
 #ifndef TC_START_LABEL
-#define TC_START_LABEL(x,y,z) (x == ':')
+#define TC_START_LABEL(STR, NUL_CHAR, NEXT_CHAR) (NEXT_CHAR == ':')
 #endif
 
 /* Set by the object-format or the target.  */
@@ -874,8 +874,7 @@ read_a_source_file (char *name)
                         symbol in the symbol table.  */
                      if (!mri_line_macro
 #ifdef TC_START_LABEL_WITHOUT_COLON
-                         && TC_START_LABEL_WITHOUT_COLON (next_char,
-                                                          input_line_pointer)
+                         && TC_START_LABEL_WITHOUT_COLON (nul_char, next_char)
 #endif
                          )
                        line_label = colon (line_start);
@@ -923,7 +922,7 @@ read_a_source_file (char *name)
                 S points to the beginning of the symbol.
                   [In case of pseudo-op, s->'.'.]
                 Input_line_pointer->'\0' where NUL_CHAR was.  */
-             if (TC_START_LABEL (next_char, s, input_line_pointer))
+             if (TC_START_LABEL (s, nul_char, next_char))
                {
                  if (flag_m68k_mri)
                    {
@@ -4603,7 +4602,7 @@ parse_bitfield_cons (exp, nbytes)
              return;
            }                   /* Too complex.  */
 
-         value |= ((~(-1 << width) & exp->X_add_number)
+         value |= ((~(-(1 << width)) & exp->X_add_number)
                    << ((BITS_PER_CHAR * nbytes) - bits_available));
 
          if ((bits_available -= width) == 0
@@ -5151,7 +5150,7 @@ output_big_leb128 (char *p, LITTLENUM_TYPE *bignum, int size, int sign)
 }
 
 /* Generate the appropriate fragments for a given expression to emit a
-   leb128 value.  */
+   leb128 value.  SIGN is 1 for sleb, 0 for uleb.  */
 
 static void
 emit_leb128_expr (expressionS *exp, int sign)
@@ -5416,7 +5415,7 @@ next_char_of_string (void)
 
 #ifndef NO_STRING_ESCAPES
     case '\\':
-      switch (c = *input_line_pointer++)
+      switch (c = *input_line_pointer++ & CHAR_MASK)
        {
        case 'b':
          c = '\b';
@@ -5467,7 +5466,7 @@ next_char_of_string (void)
                number = number * 8 + c - '0';
              }
 
-           c = number & 0xff;
+           c = number & CHAR_MASK;
          }
          --input_line_pointer;
          break;
@@ -5489,7 +5488,7 @@ next_char_of_string (void)
                  number = number * 16 + c - 'a' + 10;
                c = *input_line_pointer++;
              }
-           c = number & 0xff;
+           c = number & CHAR_MASK;
            --input_line_pointer;
          }
          break;
This page took 0.024106 seconds and 4 git commands to generate.