MIPS16/GAS: Fix assertion failures with relocations on 16-bit instructions
authorMaciej W. Rozycki <macro@imgtec.com>
Wed, 14 Dec 2016 21:20:01 +0000 (21:20 +0000)
committerMaciej W. Rozycki <macro@imgtec.com>
Wed, 14 Dec 2016 22:05:38 +0000 (22:05 +0000)
commiteefc3365838ed15c02bd7da39fbc31c00d07b398
treeaa3c25bd41a330bfb1b14ad7efc0fc2a254c32d6
parent353abf7c10561aab3e8e7ffce6e270c3743376f0
MIPS16/GAS: Fix assertion failures with relocations on 16-bit instructions

Complement commit c9775dde3277 ("MIPS16: Add R_MIPS16_PC16_S1 branch
relocation support)" and report an assembly error when a relocation is
required for an instruction, currently a branch only, that has been
forced to use its unextended encoding, either with the use of an
explicit `.t' mnemonic suffix, or by means of `.set noautoextend' being
active, fixing an assertion failure currently caused instead.

gas/
* config/tc-mips.c (md_convert_frag): Report an error instead of
asserting on `ext'.
* testsuite/gas/mips/mips16-branch-unextended-1.d: New test.
* testsuite/gas/mips/mips16-branch-unextended-2.d: New test.
* testsuite/gas/mips/mips16-branch-unextended-1.s: New test
source.
* testsuite/gas/mips/mips16-branch-unextended-2.s: New test.
* testsuite/gas/mips/mips16-branch-unextended.l: New stderr
output.
* testsuite/gas/mips/mips.exp: Run the new tests.
gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/mips16-branch-unextended-1.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips16-branch-unextended-1.s [new file with mode: 0644]
gas/testsuite/gas/mips/mips16-branch-unextended-2.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips16-branch-unextended-2.s [new file with mode: 0644]
gas/testsuite/gas/mips/mips16-branch-unextended.l [new file with mode: 0644]
This page took 0.033536 seconds and 4 git commands to generate.