This is the mail archive of the binutils@sourceware.org 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 bfin] Fix a typo in gas


This patch fixes a typo in bfin port of gas, which caused gas to accept illegal instruction like:

CC = P2 == R3;

and assemble it as

CC = P2 == P3;

Committed.


Jie
	* config/bfin-parse.y (asm_1): Fix a typo.

	testsuite/
	* gas/bfin/expected_comparison_errors.l: Expect error on Line 13.

Index: config/bfin-parse.y
===================================================================
RCS file: /cvs/src/src/gas/config/bfin-parse.y,v
retrieving revision 1.29
diff -u -p -r1.29 bfin-parse.y
--- config/bfin-parse.y	3 Sep 2009 15:36:01 -0000	1.29
+++ config/bfin-parse.y	3 Sep 2009 15:45:31 -0000
@@ -1643,7 +1643,7 @@ asm_1:   
 	| CCREG ASSIGN REG _ASSIGN_ASSIGN REG
 	{
 	  if ((IS_DREG ($3) && IS_DREG ($5))
-	      || (IS_PREG ($3) && IS_PREG ($3)))
+	      || (IS_PREG ($3) && IS_PREG ($5)))
 	    {
 	      notethat ("CCflag: CC = dpregs == dpregs\n");
 	      $$ = CCFLAG (&$3, $5.regno & CODE_MASK, 0, 0, IS_PREG ($3) ? 1 : 0);
Index: testsuite/gas/bfin/expected_comparison_errors.l
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/bfin/expected_comparison_errors.l,v
retrieving revision 1.2
diff -u -p -r1.2 expected_comparison_errors.l
--- testsuite/gas/bfin/expected_comparison_errors.l	1 Sep 2009 07:21:42 -0000	1.2
+++ testsuite/gas/bfin/expected_comparison_errors.l	3 Sep 2009 15:45:31 -0000
@@ -11,6 +11,7 @@
 .*:10: Error: Bad register in comparison. Input text was P0.
 .*:11: Error: Bad register in comparison.
 .*:12: Error: Bad register in comparison.
+.*:13: Error: Bad register in comparison. Input text was R0.
 .*:14: Error: Bad register in comparison.
 .*:15: Error: Bad register in comparison.
 .*:16: Error: Bad register in comparison.

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