S12Z: GAS: Fix incorrect range test for 16-bit PC relative offsets.
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:06 +0000 (18:08 +0100)
commit91bae99160e9d81cfe340b937f9613d43dc90293
treeea4ee1c0eb6208868c56ddf82965fdfbcf1a0887
parent1d4d86699fcc9641c1f4dfb3a44a1588353c2137
S12Z: GAS: Fix incorrect range test for 16-bit PC relative offsets.

The limits for PC relative offsets were incorrect.  This change fixes
them and adds some tests.

gas/
* config/tc-s12z.c (md_apply_fix): Fix incorrect limits.
* testsuite/gas/s12z/pc-rel-bad.d: New file.
* testsuite/gas/s12z/pc-rel-bad.l: New file.
* testsuite/gas/s12z/pc-rel-bad.s: New file.
* testsuite/gas/s12z/pc-rel-good.d: New file.
* testsuite/gas/s12z/pc-rel-good.s: New file.
* testsuite/gas/s12z/s12z.exp: Add them.
gas/ChangeLog
gas/config/tc-s12z.c
gas/testsuite/gas/s12z/pc-rel-bad.d [new file with mode: 0644]
gas/testsuite/gas/s12z/pc-rel-bad.l [new file with mode: 0644]
gas/testsuite/gas/s12z/pc-rel-bad.s [new file with mode: 0644]
gas/testsuite/gas/s12z/pc-rel-good.d [new file with mode: 0644]
gas/testsuite/gas/s12z/pc-rel-good.s [new file with mode: 0644]
gas/testsuite/gas/s12z/s12z.exp