diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-03-24 04:20:10 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-03-24 04:20:10 +0000 |
commit | ba48c47be52907e872d3aed50406986979e2358b (patch) | |
tree | a835180ba859af0f7a9c650c6561fb7310d59cbc /gas/config/bfin-parse.y | |
parent | b16a1f4c4fcbc6bc90bbe25fb0534a02f0923226 (diff) | |
download | binutils-ba48c47be52907e872d3aed50406986979e2358b.zip binutils-ba48c47be52907e872d3aed50406986979e2358b.tar.gz binutils-ba48c47be52907e872d3aed50406986979e2358b.tar.bz2 |
gas: blackfin: catch invalid register combinations with SEARCH/BITMUX
The destination registers for SEARCH cannot be the same. Same rule
for the source registers for BITMUX.
Signed-off-by: Mike Frsyinger <vapier@gentoo.org>
Diffstat (limited to 'gas/config/bfin-parse.y')
-rw-r--r-- | gas/config/bfin-parse.y | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/config/bfin-parse.y b/gas/config/bfin-parse.y index c43d1b3..fcc2ee8 100644 --- a/gas/config/bfin-parse.y +++ b/gas/config/bfin-parse.y @@ -868,6 +868,9 @@ asm_1: } | LPAREN REG COMMA REG RPAREN ASSIGN SEARCH REG LPAREN searchmod RPAREN { + if (REG_SAME ($2, $4)) + return yyerror ("Illegal dest register combination"); + if (IS_DREG ($2) && IS_DREG ($4) && IS_DREG ($8)) { notethat ("dsp32alu: (dregs , dregs ) = SEARCH dregs (searchmod)\n"); @@ -2388,6 +2391,9 @@ asm_1: | BITMUX LPAREN REG COMMA REG COMMA REG_A RPAREN asr_asl { + if (REG_SAME ($3, $5)) + return yyerror ("Illegal source register combination"); + if (IS_DREG ($3) && IS_DREG ($5) && !IS_A1 ($7)) { notethat ("dsp32shift: BITMUX (dregs , dregs , A0) (ASR)\n"); |