S12Z: GAS: Issue warning if TFR/EXG have identical source and destination.
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 1 Feb 2019 16:42:54 +0000 (17:42 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 1 Feb 2019 17:08:04 +0000 (18:08 +0100)
commit1d4d86699fcc9641c1f4dfb3a44a1588353c2137
tree6366c97db7f65ae53f3a84501c98a95f42b471f7
parent8b3a46f93c2b9ee839f806713afe7f88f0482214
S12Z: GAS: Issue warning if TFR/EXG have identical source and destination.

It is permissible for the source and destination operands of TFR and EXG to be
the same register.  However it is a pointless instruction and anyone writing it
has probably made a mistake.  This change emits a warning if such an instruction
is encountered.

gas/
* config/tc-s12z.c (tfr): Emit warning if operands are the same.
* testsuite/gas/s12z/exg.d: New test case.
* testsuite/gas/s12z/exg.l: New file.
gas/ChangeLog
gas/config/tc-s12z.c
gas/testsuite/gas/s12z/exg.d
gas/testsuite/gas/s12z/exg.l [new file with mode: 0644]