* [PATCH] Do better check for vector multiply-accumulate instruction in bfin gas
@ 2006-05-29 18:38 Jie Zhang
0 siblings, 0 replies; only message in thread
From: Jie Zhang @ 2006-05-29 18:38 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
Previously bfin gas would accept this invalid instruction without any error:
R1.H = (A1=R7.L*R5.L) , A0 += R1.L*R0.L (IS);
When assembly and objdump, we get:
0: 04 c1 7d 08 R1.H = (a1 = R7.L * R5.L), a0 += R7.L * R5.L (IS);
Blackfin allows the two operations in vector multiply-accumulate
instruction to be different type, i.e. anyone of "A =", "A +=", or "A
-=". This patch will loose the condition to check all the combinations
of the two operations.
Committed.
Jie
[-- Attachment #2: bfin-gas-better-check.diff --]
[-- Type: text/x-patch, Size: 905 bytes --]
* config/bfin-parse.y (check_macfunc): Loose the condition of
calling check_multiply_halfregs ().
Index: config/bfin-parse.y
===================================================================
RCS file: /cvsroot/gcc3/binutils/binutils-2.15/gas/config/bfin-parse.y,v
retrieving revision 1.39
diff -u -p -r1.39 bfin-parse.y
--- config/bfin-parse.y 25 May 2006 03:50:59 -0000 1.39
+++ config/bfin-parse.y 28 May 2006 00:41:15 -0000
@@ -309,9 +309,10 @@ check_macfuncs (Macfunc *aa, Opt_mode *o
return yyerror ("Vector AxMACs can't be same");
}
- /* If both ops are != 3, we have multiply_halfregs in both
+ /* If both ops are one of 0, 1, or 2, we have multiply_halfregs in both
assignment_or_macfuncs. */
- if (aa->op == ab->op && aa->op != 3)
+ if (aa->op < 3 && aa->op >=0
+ && ab->op < 3 && ab->op >= 0)
{
if (check_multiply_halfregs (aa, ab) < 0)
return -1;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-28 0:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-29 18:38 [PATCH] Do better check for vector multiply-accumulate instruction in bfin 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).