MIPS/GAS: Respect the `insn32' mode in branch relaxation
authorMaciej W. Rozycki <macro@imgtec.com>
Tue, 26 Jul 2016 16:50:55 +0000 (17:50 +0100)
committerMaciej W. Rozycki <macro@imgtec.com>
Tue, 26 Jul 2016 19:00:49 +0000 (20:00 +0100)
commit8484fb75874eb9ef35710ac6579433f062ddba18
treebfeecae7f1efaa3b56eefccde04849ebbf22b919
parent54806ffa85643c3a1ee721d5c3f5586d32f86ee1
MIPS/GAS: Respect the `insn32' mode in branch relaxation

Complement:

commit 833794fc12d98139fc33f6b0b85feb03471007b7
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Tue Jun 25 18:02:34 2013 +0000

<https://sourceware.org/ml/binutils/2013-06/msg00104.html>, ("microMIPS
insn32 mode support"), and fix an issue with microMIPS branch relaxation
producing 16-bit instructions in the `insn32' mode.  Use equivalent
32-bit instruction sequences.

gas/
* config/tc-mips.c (RELAX_MICROMIPS_ENCODE): Add `insn32' flag.
(RELAX_MICROMIPS_INSN32): New macro.
(RELAX_MICROMIPS_UNCOND, RELAX_MICROMIPS_COMPACT)
(RELAX_MICROMIPS_LINK, RELAX_MICROMIPS_RELAX32)
(RELAX_MICROMIPS_TOOFAR16, RELAX_MICROMIPS_MARK_TOOFAR16)
(RELAX_MICROMIPS_CLEAR_TOOFAR16, RELAX_MICROMIPS_TOOFAR32)
(RELAX_MICROMIPS_MARK_TOOFAR32, RELAX_MICROMIPS_CLEAR_TOOFAR32):
Shift bits.
(append_insn): Record `mips_opts.insn32' with relaxed microMIPS
branches.
(relaxed_micromips_32bit_branch_length): Handle the `insn32'
mode.
(md_convert_frag): Likewise.
* testsuite/gas/mips/micromips-branch-relax.s: Add `insn32'
conditionals.
* testsuite/gas/mips/micromips-branch-relax.l: Update line
numbers accordingly.
* testsuite/gas/mips/micromips-branch-relax-pic.l: Likewise.
* testsuite/gas/mips/micromips-branch-relax-insn32.d: New test.
* testsuite/gas/mips/micromips-branch-relax-insn32-pic.d: New
test.
* testsuite/gas/mips/micromips-branch-relax-insn32.l: New
stderr output.
* testsuite/gas/mips/micromips-branch-relax-insn32-pic.l: New
stderr output.
* testsuite/gas/mips/mips.exp: Run the new tests.
gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/gas/mips/micromips-branch-relax-insn32-pic.d [new file with mode: 0644]
gas/testsuite/gas/mips/micromips-branch-relax-insn32-pic.l [new file with mode: 0644]
gas/testsuite/gas/mips/micromips-branch-relax-insn32.d [new file with mode: 0644]
gas/testsuite/gas/mips/micromips-branch-relax-insn32.l [new file with mode: 0644]
gas/testsuite/gas/mips/micromips-branch-relax-pic.l
gas/testsuite/gas/mips/micromips-branch-relax.l
gas/testsuite/gas/mips/micromips-branch-relax.s
gas/testsuite/gas/mips/mips.exp
This page took 0.027906 seconds and 4 git commands to generate.