* [PATCH bfin] Fix a typo in gas
@ 2009-09-03 15:52 Jie Zhang
0 siblings, 0 replies; only message in thread
From: Jie Zhang @ 2009-09-03 15:52 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
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
[-- Attachment #2: gas-bfin-report-error-on-wrong-comparison-insn.diff --]
[-- Type: text/x-patch, Size: 1558 bytes --]
* 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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-03 15:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-03 15:52 [PATCH bfin] Fix a typo in gas Jie Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).