* v850-opc.c: Close unterminated comment.
[deliverable/binutils-gdb.git] / gas / gasp.c
index bd6ea2d56287096c005d2bbec0691bb19bd33cbb..ff779b055d6f245de157667888dc1e21ac373e03 100644 (file)
@@ -1103,7 +1103,21 @@ change_base (idx, in, out)
 
   while (idx < in->len)
     {
-      if (idx < in->len - 1 && in->ptr[idx + 1] == '\'' && ! mri)
+      if (in->ptr[idx] == '\\'
+         && idx + 1 < in->len
+         && in->ptr[idx + 1] == '(')
+       {
+         idx += 2;
+         while (idx < in->len
+                && in->ptr[idx] != ')')
+           {
+             sb_add_char (out, in->ptr[idx]);
+             idx++;
+           }
+         if (idx < in->len)
+           idx++;
+       }
+      else if (idx < in->len - 1 && in->ptr[idx + 1] == '\'' && ! mri)
        {
          int base;
          int value;
@@ -1399,15 +1413,29 @@ do_align (idx, in)
      int idx;
      sb *in;
 {
-  int al;
+  int al, have_fill, fill;
+
   idx = exp_get_abs ("align needs absolute expression.\n", idx, in, &al);
+  idx = sb_skip_white (idx, in);
+  have_fill = 0;
+  fill = 0;
+  if (! eol (idx, in))
+    {
+      idx = sb_skip_comma (idx, in);
+      idx = exp_get_abs (".align needs absolute fill value.\n", idx, in,
+                        &fill);
+      have_fill = 1;
+    }
 
   if (al != 1
       && al != 2
       && al != 4)
     WARNING ((stderr, "alignment must be one of 1, 2 or 4.\n"));
 
-  fprintf (outfile, ".align    %d\n", al);
+  fprintf (outfile, ".align    %d", al);
+  if (have_fill)
+    fprintf (outfile, ",%d", fill);
+  fprintf (outfile, "\n");
 }
 
 /* .res[.b|.w|.l] <size> */
@@ -1761,11 +1789,24 @@ process_assigns (idx, in, buf)
     {
       hash_entry *ptr;
       if (in->ptr[idx] == '\\'
+         && idx + 1 < in->len
+         && in->ptr[idx + 1] == '(')
+       {
+         do
+           {
+             sb_add_char (buf, in->ptr[idx]);
+             idx++;
+           }
+         while (idx < in->len && in->ptr[idx - 1] != ')');
+       }
+      else if (in->ptr[idx] == '\\'
+         && idx + 1 < in->len
          && in->ptr[idx + 1] == '&')
        {
          idx = condass_lookup_name (in, idx + 2, buf, 1);
        }
       else if (in->ptr[idx] == '\\'
+              && idx + 1 < in->len
               && in->ptr[idx + 1] == '$')
        {
          idx = condass_lookup_name (in, idx + 2, buf, 0);
@@ -3225,7 +3266,7 @@ process_pseudo_op (idx, line, acc)
            {
            case K_ALTERNATE:
              alternate = 1;
-             macro_init (1, mri, exp_get_abs);
+             macro_init (1, mri, 0, exp_get_abs);
              return 1;
            case K_AELSE:
              do_aelse ();
@@ -3500,14 +3541,14 @@ Usage: %s \n\
   [-h]      [--help]              print this message\n\
   [-M]      [--mri]               enter MRI compatibility mode\n\
   [-o out]  [--output out]        set the output file\n\
-  [-p]      [--print]             print line numbers\n");
+  [-p]      [--print]             print line numbers\n", program_name);
   fprintf (file, "\
   [-s]      [--copysource]        copy source through as comments \n\
   [-u]      [--unreasonable]      allow unreasonable nesting\n\
   [-v]      [--version]           print the program version\n\
   [-Dname=value]                  create preprocessor variable called name, with value\n\
   [-Ipath]                        add to include path list\n\
-  [in-file]\n",   program_name);
+  [in-file]\n");
   exit (status);
 }
 
@@ -3606,7 +3647,7 @@ main (argc, argv)
 
   process_init ();
 
-  macro_init (alternate, mri, exp_get_abs);
+  macro_init (alternate, mri, 0, exp_get_abs);
 
   if (out_name) {
     outfile = fopen (out_name, "w");
This page took 0.024036 seconds and 4 git commands to generate.