gas: blackfin: reject invalid 16bit acc add insns

The 16bit acc add insn cannot assign the two results to the same dreg,
so make sure gas rejects attempts to use this insn variant.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2011-03-29 01:25:13 +00:00
parent 332bf1ed74
commit f4a2f576d4
7 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2011-03-28 Mike Frysinger <vapier@gentoo.org>
* config/bfin-parse.y (16bit acc add): Return yyerror when dest
reg $1 is the same as dest reg $7.
2011-03-28 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (handle_quad): New.

View File

@ -886,6 +886,9 @@ asm_1:
| REG ASSIGN A_ONE_DOT_L PLUS A_ONE_DOT_H COMMA
REG ASSIGN A_ZERO_DOT_L PLUS A_ZERO_DOT_H
{
if (REG_SAME ($1, $7))
return yyerror ("Illegal dest register combination");
if (IS_DREG ($1) && IS_DREG ($7))
{
notethat ("dsp32alu: dregs = A1.l + A1.h, dregs = A0.l + A0.h \n");

View File

@ -1,3 +1,10 @@
2011-03-28 Mike Frysinger <vapier@gentoo.org>
* gas/bfin/expected_errors.s: Add invalid 16bit acc add insn tests.
* gas/bfin/expected_errors.l: Add new error messages.
* testsuite/gas/bfin/video2.s: Drop invalid 16bit acc add insn.
* testsuite/gas/bfin/video2.d: Updated disassembly output.
2011-03-28 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/ilp32/inval.s: Remove .quad.

View File

@ -100,3 +100,4 @@
.*:126: Error: Resource conflict in dest reg.
.*:127: Error: Differing source registers.
.*:129: Error: Register mismatch.
.*:131: Error: Illegal dest register combination. Input text was A0.H.

View File

@ -127,3 +127,5 @@
R7 = R3 +|- R4, R1 = R1 -|+ R2;
R0 = R3 + R4, R1 = R5 - R6;
R7 = A1.L + A1.H, R7 = A0.L + A0.H;

View File

@ -50,7 +50,6 @@ Disassembly of section .text:
[ 0-9a-f]+: 37 c4 10 0a R5 = BYTEOP3P \(R3:2, R1:0\) \(HI\);
[ 0-9a-f]+: 17 c4 10 2c R6 = BYTEOP3P \(R3:2, R1:0\) \(LO, R\);
[ 0-9a-f]+: 37 c4 10 2e R7 = BYTEOP3P \(R3:2, R1:0\) \(HI, R\);
[ 0-9a-f]+: 0c c4 00 40 R0 = A1.L \+ A1.H, R0 = A0.L \+ A0.H;
[ 0-9a-f]+: 0c c4 00 42 R0 = A1.L \+ A1.H, R1 = A0.L \+ A0.H;
[ 0-9a-f]+: 0c c4 80 46 R2 = A1.L \+ A1.H, R3 = A0.L \+ A0.H;
[ 0-9a-f]+: 0c c4 00 4b R4 = A1.L \+ A1.H, R5 = A0.L \+ A0.H;

View File

@ -68,7 +68,6 @@ r7 = byteop3p (r3:2, r1:0) (hi, r) ;
//Dreg = A1.L + A1.H, Dreg = A0.L + A0.H ; /* (b) */
R0 = A1.L + A1.H, R0= A0.L + A0.H ;
R0 = A1.L + A1.H, R1= A0.L + A0.H ;
R2 = A1.L + A1.H, R3= A0.L + A0.H ;
R4 = A1.L + A1.H, R5= A0.L + A0.H ;