diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-03-24 06:17:45 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-03-24 06:17:45 +0000 |
commit | 27ad7a00432f76a41ecff1fbea91e6dcc973a951 (patch) | |
tree | 929d6613caead77e735f8e52c9739b1d71d9abce /gas/config/bfin-parse.y | |
parent | 435c44bde6b90313812b0ef52628cbf44d75fed5 (diff) | |
download | binutils-redhat-27ad7a00432f76a41ecff1fbea91e6dcc973a951.tar.gz |
gas: blackfin: reject invalid register destinations for vector add/sub
The destination registers with vector add/sub insns must be different,
so make sure gas rejects attempt to write these.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'gas/config/bfin-parse.y')
-rw-r--r-- | gas/config/bfin-parse.y | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/config/bfin-parse.y b/gas/config/bfin-parse.y index f20d20b3c1..803afd1c55 100644 --- a/gas/config/bfin-parse.y +++ b/gas/config/bfin-parse.y @@ -1,5 +1,5 @@ /* bfin-parse.y ADI Blackfin parser - Copyright 2005, 2006, 2007, 2008, 2009, 2010 + Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -898,6 +898,9 @@ asm_1: | REG ASSIGN REG_A PLUS REG_A COMMA REG ASSIGN REG_A MINUS REG_A amod1 { + if (REG_SAME ($1, $7)) + return yyerror ("Resource conflict in dest reg"); + if (IS_DREG ($1) && IS_DREG ($7) && !REG_SAME ($3, $5) && IS_A1 ($9) && !IS_A1 ($11)) { @@ -941,6 +944,8 @@ asm_1: if (!IS_DREG ($1) || !IS_DREG ($3) || !IS_DREG ($5) || !IS_DREG ($7)) return yyerror ("Dregs expected"); + if (REG_SAME ($1, $7)) + return yyerror ("Resource conflict in dest reg"); if ($4.r0 == 1 && $10.r0 == 2) { |