aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-03-24 04:25:25 +0000
committerMike Frysinger <vapier@gentoo.org>2011-03-24 04:25:25 +0000
commita0bc8198d335dcb2187ea86b3bfef71acfdc3d75 (patch)
treee863ce0e9d9c1d7c722c4f2c5d99f6b92b119fc4 /gas/config
parentba48c47be52907e872d3aed50406986979e2358b (diff)
downloadgdb-a0bc8198d335dcb2187ea86b3bfef71acfdc3d75.zip
gdb-a0bc8198d335dcb2187ea86b3bfef71acfdc3d75.tar.gz
gdb-a0bc8198d335dcb2187ea86b3bfef71acfdc3d75.tar.bz2
gas: blackfin: catch invalid dest dregs in dsp mult insns
While we were catching a few mismatches in vectorized dsp mult insns, the error we displayed was misleading. Once we fix that up, we can convert previously dead code into proper checking for destination dreg matching. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/bfin-parse.y12
1 files changed, 8 insertions, 4 deletions
diff --git a/gas/config/bfin-parse.y b/gas/config/bfin-parse.y
index fcc2ee8..f20d20b 100644
--- a/gas/config/bfin-parse.y
+++ b/gas/config/bfin-parse.y
@@ -336,11 +336,15 @@ check_macfuncs (Macfunc *aa, Opt_mode *opa,
aa->s1.regno |= (ab->s1.regno & CODE_MASK);
}
- if (aa->w == ab->w && aa->P != ab->P)
+ if (aa->w == ab->w && aa->P != ab->P)
+ return yyerror ("Destination Dreg sizes (full or half) must match");
+
+ if (aa->w && ab->w)
{
- return yyerror ("macfuncs must differ");
- if (aa->w && (aa->dst.regno - ab->dst.regno != 1))
- return yyerror ("Destination Dregs must differ by one");
+ if (aa->P && (aa->dst.regno - ab->dst.regno) != 1)
+ return yyerror ("Destination Dregs (full) must differ by one");
+ if (!aa->P && aa->dst.regno != ab->dst.regno)
+ return yyerror ("Destination Dregs (half) must match");
}
/* Make sure mod flags get ORed, too. */