gas/
authorJan Beulich <jbeulich@novell.com>
Wed, 2 Feb 2005 07:37:36 +0000 (07:37 +0000)
committerJan Beulich <jbeulich@novell.com>
Wed, 2 Feb 2005 07:37:36 +0000 (07:37 +0000)
2005-02-02  Jan Beulich  <jbeulich@novell.com>

* config/tc-ia64.c (dot_pred_rel): Update comment. Handle @-prefixed
designators along with quoted ones. Free copy of quoted designator
when done.

gas/testsuite/
2005-02-02  Jan Beulich  <jbeulich@novell.com>

* gas/ia64/pred-rel.s: New.
* gas/ia64/ia64.exp: Run new test.

gas/ChangeLog
gas/config/tc-ia64.c
gas/testsuite/ChangeLog
gas/testsuite/gas/ia64/ia64.exp
gas/testsuite/gas/ia64/pred-rel.s [new file with mode: 0644]

index 90c5feb878f8fd0758b5fc08307494b583967074..d004819c405c7d0785ab93ef984ac8d65a694daa 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-02  Jan Beulich  <jbeulich@novell.com>
+
+       * config/tc-ia64.c (dot_pred_rel): Update comment. Handle @-prefixed
+       designators along with quoted ones. Free copy of quoted designator
+       when done.
+
 2005-02-01  Ben Elliston  <bje@au.ibm.com>
 
        * config/atof-ieee.c, config/obj-coff.c, config/obj-elf.c,
index 250fa7771cba5b75cb84f4ce852a85b3641c2d32..48ad67221ed53fca4035fe94d50606c4914c5242 100644 (file)
@@ -4928,9 +4928,9 @@ print_prmask (mask)
 }
 
 /*
-  .pred.rel.clear [p1 [,p2 [,...]]]     (also .pred.rel "clear")
-  .pred.rel.imply p1, p2                (also .pred.rel "imply")
-  .pred.rel.mutex p1, p2 [,...]         (also .pred.rel "mutex")
+  .pred.rel.clear [p1 [,p2 [,...]]]     (also .pred.rel "clear" or @clear)
+  .pred.rel.imply p1, p2                (also .pred.rel "imply" or @imply)
+  .pred.rel.mutex p1, p2 [,...]         (also .pred.rel "mutex" or @mutex)
   .pred.safe_across_calls p1 [, p2 [,...]]
  */
 
@@ -4944,28 +4944,43 @@ dot_pred_rel (type)
 
   if (type == 0)
     {
-      if (*input_line_pointer != '"')
-       {
-         as_bad (_("Missing predicate relation type"));
-         ignore_rest_of_line ();
-         return;
-       }
-      else
+      if (*input_line_pointer == '"')
        {
          int len;
          char *form = demand_copy_C_string (&len);
+
          if (strcmp (form, "mutex") == 0)
            type = 'm';
          else if (strcmp (form, "clear") == 0)
            type = 'c';
          else if (strcmp (form, "imply") == 0)
            type = 'i';
-         else
-           {
-             as_bad (_("Unrecognized predicate relation type"));
-             ignore_rest_of_line ();
-             return;
-           }
+         obstack_free (&notes, form);
+       }
+      else if (*input_line_pointer == '@')
+       {
+         char *form = ++input_line_pointer;
+         char c = get_symbol_end();
+
+         if (strcmp (form, "mutex") == 0)
+           type = 'm';
+         else if (strcmp (form, "clear") == 0)
+           type = 'c';
+         else if (strcmp (form, "imply") == 0)
+           type = 'i';
+         *input_line_pointer = c;
+       }
+      else
+       {
+         as_bad (_("Missing predicate relation type"));
+         ignore_rest_of_line ();
+         return;
+       }
+      if (type == 0)
+       {
+         as_bad (_("Unrecognized predicate relation type"));
+         ignore_rest_of_line ();
+         return;
        }
       if (*input_line_pointer == ',')
        ++input_line_pointer;
index a9754d3187f036134f56cb205377eb18865f03a3..b72178ad8dae9cecd773b76c26a77323486399e1 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-02  Jan Beulich  <jbeulich@novell.com>
+
+       * gas/ia64/pred-rel.s: New.
+       * gas/ia64/ia64.exp: Run new test.
+
 2005-01-31  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * gas/mips/elf-rel23.d, gas/mips/elf-rel23a.d: Accept little-endian.
index 89c5d20aecb15b119c3875658ea6a18961cb6a29..d36f92fb62c813a4007da3cf17f963c7e5c5e13d 100644 (file)
@@ -37,6 +37,7 @@ if [istarget "ia64-*"] then {
     run_dump_test "dv-branch"
     run_dump_test "dv-imply"
     run_dump_test "dv-mutex"
+    gas_test "pred-rel.s" "" "" ".pred.rel alternative forms"
     run_dump_test "dv-safe"
     run_dump_test "dv-srlz"
     run_dump_test "tls"
diff --git a/gas/testsuite/gas/ia64/pred-rel.s b/gas/testsuite/gas/ia64/pred-rel.s
new file mode 100644 (file)
index 0000000..1316921
--- /dev/null
@@ -0,0 +1,21 @@
+// Make sure all forms of .pred.rel are accepted
+_start:
+       .pred.rel "mutex", p1, p2
+       .pred.rel "imply", p2, p3
+       .pred.rel "clear", p1, p2, p3
+
+       .pred.rel "mutex" p1, p2
+       .pred.rel "imply" p2, p3
+       .pred.rel "clear" p1, p2, p3
+
+       .pred.rel.mutex p1, p2
+       .pred.rel.imply p2, p3
+       .pred.rel.clear p1, p2, p3
+
+       .pred.rel @mutex, p1, p2
+       .pred.rel @imply, p2, p3
+       .pred.rel @clear, p1, p2, p3
+
+       .pred.rel @mutex p1, p2
+       .pred.rel @imply p2, p3
+       .pred.rel @clear p1, p2, p3