diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2017-05-12 02:28:54 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2017-05-12 02:34:56 +0100 |
commit | be3f1006743f04f0b133de7fa8085a3e4c49b193 (patch) | |
tree | f2525c87a41cc2afe9a955aac6cd9d54de3a605e /gas/config/tc-mips.c | |
parent | a4f89915135f6760917c01dc783de5b674234d84 (diff) | |
download | gdb-be3f1006743f04f0b133de7fa8085a3e4c49b193.zip gdb-be3f1006743f04f0b133de7fa8085a3e4c49b193.tar.gz gdb-be3f1006743f04f0b133de7fa8085a3e4c49b193.tar.bz2 |
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.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 4ead209..e73b9c9 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -14094,6 +14094,7 @@ static const struct percent_op_match mips_percent_op[] = {"%got_lo", BFD_RELOC_MIPS_GOT_LO16}, {"%got", BFD_RELOC_MIPS_GOT16}, {"%gp_rel", BFD_RELOC_GPREL16}, + {"%gprel", BFD_RELOC_GPREL16}, {"%half", BFD_RELOC_16}, {"%highest", BFD_RELOC_MIPS_HIGHEST}, {"%higher", BFD_RELOC_MIPS_HIGHER}, @@ -14113,6 +14114,7 @@ static const struct percent_op_match mips_percent_op[] = static const struct percent_op_match mips16_percent_op[] = { {"%lo", BFD_RELOC_MIPS16_LO16}, + {"%gp_rel", BFD_RELOC_MIPS16_GPREL}, {"%gprel", BFD_RELOC_MIPS16_GPREL}, {"%got", BFD_RELOC_MIPS16_GOT16}, {"%call16", BFD_RELOC_MIPS16_CALL16}, |