MIPS/GAS: Unify GP-relative percent-ops
authorMaciej W. Rozycki <macro@imgtec.com>
Fri, 12 May 2017 01:28:54 +0000 (02:28 +0100)
committerMaciej W. Rozycki <macro@imgtec.com>
Fri, 12 May 2017 01:34:56 +0000 (02:34 +0100)
commitbe3f1006743f04f0b133de7fa8085a3e4c49b193
treef2525c87a41cc2afe9a955aac6cd9d54de3a605e
parenta4f89915135f6760917c01dc783de5b674234d84
MIPS/GAS: Unify GP-relative percent-ops

For a reason that is unclear commit d6f165938798 ("Support for MIPS16
HI16/LO16 relocations"),
<https://sourceware.org/ml/binutils/2005-02/msg00332.html>, which has
added support for the R_MIPS16_GPREL relocation, has spelled its
corresponding MIPS16 percent-op as `%gprel', rather than `%gp_rel' which
is how its regular MIPS counterpart is spelled.  To make assembly code
sharing easier between the regular MIPS and the MIPS16 ISA make both
percent-op spellings acceptable in both kinds of code now.

Parts of this change by Matthew Fortune.

gas/
* config/tc-mips.c (mips_percent_op): Add "%gprel".
(mips16_percent_op): Add "%gp_rel".
* testsuite/gas/mips/elf-rel8.s:: Add `%gprel' forms.
* testsuite/gas/mips/elf-rel8-mips16.s: Add `%gp_rel' forms.
* testsuite/gas/mips/elf-rel8.d: Adjust accordingly.
* testsuite/gas/mips/elf-rel8-mips16.d: Likewise.
gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/gas/mips/elf-rel8-mips16.d
gas/testsuite/gas/mips/elf-rel8-mips16.s
gas/testsuite/gas/mips/elf-rel8.d
gas/testsuite/gas/mips/elf-rel8.s