This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] ia64: correct .radix


This makes the .radix syntactically identical to ias' (it still doesn't
add any functionality to implement other than the C radix).

Built and tested on ia64-unknown-linux-gnu.

Jan

gas/
2005-05-20  Jan Beulich  <jbeulich@novell.com>

	* config/tc-ia64.c (dot_radix): Rewrite.

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

	* gas/ia64/radix.s: New.
	* gas/ia64/radix.l: New.
	* gas/ia64/ia64.exp: Run new test.

--- /home/jbeulich/src/binutils/mainline/2005-05-18/gas/config/tc-ia64.c	2005-05-09 08:31:38.000000000 +0200
+++ 2005-05-18/gas/config/tc-ia64.c	2005-05-20 16:42:38.439810388 +0200
@@ -3074,17 +3066,20 @@ static void
 dot_radix (dummy)
      int dummy ATTRIBUTE_UNUSED;
 {
-  int radix;
+  char *radix;
+  int ch;
 
   SKIP_WHITESPACE ();
-  radix = *input_line_pointer++;
 
-  if (radix != 'C' && !is_end_of_line[(unsigned char) radix])
-    {
-      as_bad ("Radix `%c' unsupported", *input_line_pointer);
-      ignore_rest_of_line ();
-      return;
-    }
+  if (is_it_end_of_statement ())
+    return;
+  radix = input_line_pointer;
+  ch = get_symbol_end ();
+  ia64_canonicalize_symbol_name (radix);
+  if (strcasecmp (radix, "C"))
+    as_bad ("Radix `%s' unsupported or invalid", radix);
+  *input_line_pointer = ch;
+  demand_empty_rest_of_line ();
 }
 
 /* Helper function for .loc directives.  If the assembler is not generating
--- /home/jbeulich/src/binutils/mainline/2005-05-18/gas/testsuite/gas/ia64/ia64.exp	2005-05-09 08:31:39.000000000 +0200
+++ 2005-05-18/gas/testsuite/gas/ia64/ia64.exp	2005-05-20 16:42:38.440786951 +0200
@@ -80,6 +80,7 @@ if [istarget "ia64-*"] then {
     run_list_test "no-fit" ""
     run_list_test "pound" "-al"
     run_list_test "proc" "-munwind-check=error"
+    run_list_test "radix" ""
     run_list_test "slot2" ""
     run_list_test "unwind-err" "-munwind-check=error"
     run_dump_test "operand-or"
--- /home/jbeulich/src/binutils/mainline/2005-05-18/gas/testsuite/gas/ia64/radix.l	1970-01-01 01:00:00.000000000 +0100
+++ 2005-05-18/gas/testsuite/gas/ia64/radix.l	2005-05-18 16:19:05.000000000 +0200
@@ -0,0 +1,4 @@
+.*: Assembler messages:
+.*:1: Error: Radix .a. .*invalid
+.*:4: Error: Radix .cc. .*invalid
+.*:5: Error: Radix .Z. .*invalid
--- /home/jbeulich/src/binutils/mainline/2005-05-18/gas/testsuite/gas/ia64/radix.s	1970-01-01 01:00:00.000000000 +0100
+++ 2005-05-18/gas/testsuite/gas/ia64/radix.s	2005-05-18 16:13:58.000000000 +0200
@@ -0,0 +1,5 @@
+	.radix a
+	.radix c
+	.radix C#
+	.radix cc
+	.radix Z


Attachment: binutils-mainline-ia64-radix.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]