[prev in list] [next in list] [prev in thread] [next in thread] 

List:       binutils
Subject:    [PATCH] ia64: equate improvements
From:       "Jan Beulich" <JBeulich () novell ! com>
Date:       2005-09-30 15:51:33
Message-ID: 433D7B25.76F0.0078.0 () novell ! com
[Download RAW message or body]

This is the IA64 specific adjustment as a followup to the previously
submitted patch to adjust the handling of equates (upon which this
patch obviously depends).

Built and tested (on top of the aforementioned target independent
patch)
on ia64-unknown-linux-gnu.

Jan

gas/
2005-09-30  Jan Beulich  <jbeulich@novell.com>

	* config/tc-ia64.c (dot_reg_val): Use expression_and_evaluate.
	(dot_pred_rel): Likewise.
	(parse_operand): Likewise.
	(ia64_unrecognized_line): Likewise.
	(md_operand): Likewise.

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

	* gas/ia64/forward.[sd]: New.
	* gas/ia64/ia64.exp: Run new test.

---
/home/jbeulich/src/binutils/mainline/2005-09-27/gas/config/tc-ia64.c	2005-09-26
08:41:21.000000000 +0200
+++ 2005-09-27/gas/config/tc-ia64.c	2005-09-26 11:14:53.000000000
+0200
@@ -5103,7 +5103,7 @@ dot_reg_val (dummy)
 {
   expressionS reg;
 
-  expression (&reg);
+  expression_and_evaluate (&reg);
   if (reg.X_op != O_register)
     {
       as_bad (_("Register name expected"));
@@ -5275,7 +5275,7 @@ dot_pred_rel (type)
       int regno;
       expressionS pr, *pr1, *pr2;
 
-      expression (&pr);
+      expression_and_evaluate (&pr);
       if (pr.X_op == O_register
 	  && pr.X_add_number >= REG_P
 	  && pr.X_add_number <= REG_P + 63)
@@ -6181,7 +6181,7 @@ parse_operand (e, more)
   memset (e, 0, sizeof (*e));
   e->X_op = O_absent;
   SKIP_WHITESPACE ();
-  expression (e);
+  expression_and_evaluate (e);
   sep = *input_line_pointer;
   if (more && (sep == ',' || sep == more))
     ++input_line_pointer;
@@ -7818,7 +7818,7 @@ ia64_unrecognized_line (ch)
   switch (ch)
     {
     case '(':
-      expression (&md.qp);
+      expression_and_evaluate (&md.qp);
       if (*input_line_pointer++ != ')')
 	{
 	  as_bad ("Expected ')'");
@@ -11018,7 +11018,7 @@ md_operand (e)
     {
     case '[':
       ++input_line_pointer;
-      expression (e);
+      expression_and_evaluate (e);
       if (*input_line_pointer != ']')
 	{
 	  as_bad ("Closing bracket missing");
---
/home/jbeulich/src/binutils/mainline/2005-09-27/gas/testsuite/gas/ia64/forward.d	1970-01-01
01:00:00.000000000 +0100
+++ 2005-09-27/gas/testsuite/gas/ia64/forward.d	2005-09-19
17:26:55.000000000 +0200
@@ -0,0 +1,15 @@
+# as: -xexplicit
+# objdump: -d
+# name ia64 forward references
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+ <_start>:
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+\[MIB\][[:space:]]+alloc
r31=ar.pfs,12,6,8
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+[[:space:]]+dep.z
r2=1,5,7
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+\(p0?6\)[[:space:]]+br.cond.sptk.few
0+ <_start>;;
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+\[MIB\][[:space:]]+alloc
r31=ar.pfs,0,0,0
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+[[:space:]]+dep.z
r3=-1,1,1
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+\(p0?7\)[[:space:]]+br(\.cond)?\.sptk(\.few)?
[[:xdigit:]]+0 <.*>;;
---
/home/jbeulich/src/binutils/mainline/2005-09-27/gas/testsuite/gas/ia64/forward.s	1970-01-01
01:00:00.000000000 +0100
+++ 2005-09-27/gas/testsuite/gas/ia64/forward.s	2005-09-26
11:46:58.000000000 +0200
@@ -0,0 +1,27 @@
+two == 2*one
+one = 1
+three == 3*one
+four = 4*one
+
+RA == rA
+rA = r2
+
+PA == pA
+pA = p6
+
+ .text
+_start:
+	alloc	r31 = one + 1, two + 2, three + 3, four + 4
+	dep.z	RA = one, two + 3, three + 4
+(PA)	br.sptk	_start
+	;;
+
+one = -1
+rA = r3
+pA = p7
+
+.L1:
+	alloc	r31 = one + 1, two + 2, three + 3, four - 4
+	dep.z	RA = one, two + 3, three + 4
+(PA)	br.sptk	.L1
+	;;
---
/home/jbeulich/src/binutils/mainline/2005-09-27/gas/testsuite/gas/ia64/ia64.exp	2005-06-16
17:01:14.000000000 +0200
+++ 2005-09-27/gas/testsuite/gas/ia64/ia64.exp	2005-09-26
11:46:26.000000000 +0200
@@ -77,6 +77,7 @@ if [istarget "ia64-*"] then {
     }
 
     run_dump_test "bundling"
+    run_dump_test "forward"
     run_list_test "label" ""
     run_list_test "last" ""
     run_list_test "no-fit" ""


["binutils-mainline-ia64-equate.patch" (application/octet-stream)]

This is the IA64 specific adjustment as a followup to the previously
submitted patch to adjust the handling of equates (upon which this
patch obviously depends).

Built and tested (on top of the aforementioned target independent patch)
on ia64-unknown-linux-gnu.

Jan

gas/
2005-09-30  Jan Beulich  <jbeulich@novell.com>

	* config/tc-ia64.c (dot_reg_val): Use expression_and_evaluate.
	(dot_pred_rel): Likewise.
	(parse_operand): Likewise.
	(ia64_unrecognized_line): Likewise.
	(md_operand): Likewise.

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

	* gas/ia64/forward.[sd]: New.
	* gas/ia64/ia64.exp: Run new test.

--- /home/jbeulich/src/binutils/mainline/2005-09-27/gas/config/tc-ia64.c	2005-09-26 \
                08:41:21.000000000 +0200
+++ 2005-09-27/gas/config/tc-ia64.c	2005-09-26 11:14:53.000000000 +0200
@@ -5103,7 +5103,7 @@ dot_reg_val (dummy)
 {
   expressionS reg;
 
-  expression (&reg);
+  expression_and_evaluate (&reg);
   if (reg.X_op != O_register)
     {
       as_bad (_("Register name expected"));
@@ -5275,7 +5275,7 @@ dot_pred_rel (type)
       int regno;
       expressionS pr, *pr1, *pr2;
 
-      expression (&pr);
+      expression_and_evaluate (&pr);
       if (pr.X_op == O_register
 	  && pr.X_add_number >= REG_P
 	  && pr.X_add_number <= REG_P + 63)
@@ -6181,7 +6181,7 @@ parse_operand (e, more)
   memset (e, 0, sizeof (*e));
   e->X_op = O_absent;
   SKIP_WHITESPACE ();
-  expression (e);
+  expression_and_evaluate (e);
   sep = *input_line_pointer;
   if (more && (sep == ',' || sep == more))
     ++input_line_pointer;
@@ -7818,7 +7818,7 @@ ia64_unrecognized_line (ch)
   switch (ch)
     {
     case '(':
-      expression (&md.qp);
+      expression_and_evaluate (&md.qp);
       if (*input_line_pointer++ != ')')
 	{
 	  as_bad ("Expected ')'");
@@ -11018,7 +11018,7 @@ md_operand (e)
     {
     case '[':
       ++input_line_pointer;
-      expression (e);
+      expression_and_evaluate (e);
       if (*input_line_pointer != ']')
 	{
 	  as_bad ("Closing bracket missing");
--- /home/jbeulich/src/binutils/mainline/2005-09-27/gas/testsuite/gas/ia64/forward.d	1970-01-01 \
                01:00:00.000000000 +0100
+++ 2005-09-27/gas/testsuite/gas/ia64/forward.d	2005-09-19 17:26:55.000000000 +0200
@@ -0,0 +1,15 @@
+# as: -xexplicit
+# objdump: -d
+# name ia64 forward references
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+ <_start>:
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+\[MIB\][[:space:]]+alloc \
r31=ar.pfs,12,6,8 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+[[:space:]]+dep.z \
r2=1,5,7 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+\(p0?6\)[[:space:]]+br.cond.sptk.few \
0+ <_start>;; +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+\[MIB\][[:space:]]+alloc \
r31=ar.pfs,0,0,0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+[[:space:]]+dep.z \
r3=-1,1,1 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+\(p0?7\)[[:space:]]+br(\.cond)?\.sptk(\.few)? \
                [[:xdigit:]]+0 <.*>;;
--- /home/jbeulich/src/binutils/mainline/2005-09-27/gas/testsuite/gas/ia64/forward.s	1970-01-01 \
                01:00:00.000000000 +0100
+++ 2005-09-27/gas/testsuite/gas/ia64/forward.s	2005-09-26 11:46:58.000000000 +0200
@@ -0,0 +1,27 @@
+two == 2*one
+one = 1
+three == 3*one
+four = 4*one
+
+RA == rA
+rA = r2
+
+PA == pA
+pA = p6
+
+ .text
+_start:
+	alloc	r31 = one + 1, two + 2, three + 3, four + 4
+	dep.z	RA = one, two + 3, three + 4
+(PA)	br.sptk	_start
+	;;
+
+one = -1
+rA = r3
+pA = p7
+
+.L1:
+	alloc	r31 = one + 1, two + 2, three + 3, four - 4
+	dep.z	RA = one, two + 3, three + 4
+(PA)	br.sptk	.L1
+	;;
--- /home/jbeulich/src/binutils/mainline/2005-09-27/gas/testsuite/gas/ia64/ia64.exp	2005-06-16 \
                17:01:14.000000000 +0200
+++ 2005-09-27/gas/testsuite/gas/ia64/ia64.exp	2005-09-26 11:46:26.000000000 +0200
@@ -77,6 +77,7 @@ if [istarget "ia64-*"] then {
     }
 
     run_dump_test "bundling"
+    run_dump_test "forward"
     run_list_test "label" ""
     run_list_test "last" ""
     run_list_test "no-fit" ""



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic