https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96770

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Christophe Lyon <cl...@gcc.gnu.org>:

https://gcc.gnu.org/g:c3c3e2c9e88e25a410a2fe089782b094e911bb39

commit r11-4599-gc3c3e2c9e88e25a410a2fe089782b094e911bb39
Author: Christophe Lyon <christophe.l...@linaro.org>
Date:   Mon Nov 2 07:34:50 2020 +0000

    arm: Improve handling of relocations with small offsets with -mpure-code on
v6m (PR96770)

    With -mpure-code on v6m (thumb-1), we can use small offsets with
    upper/lower relocations to avoid the extra addition of the
    offset.

    This patch accepts expressions symbol+offset as legitimate constants
    when the literal pool is disabled, making sure that the offset is
    within the range supported by thumb-1 [0..255] as described in the
    AAELF32 documentation.

    It also makes sure that thumb1_movsi_insn emits an error in case we
    try to use it with an unsupported RTL construct.

    2020-09-28  Christophe Lyon  <christophe.l...@linaro.org>

            gcc/
            PR target/96770
            * config/arm/arm.c (thumb_legitimate_constant_p): Accept
            (symbol_ref + addend) when literal pool is disabled.
            (arm_valid_symbolic_address_p): Add support for thumb-1 without
            MOVT/MOVW.
            * config/arm/thumb1.md (*thumb1_movsi_insn): Accept (symbol_ref +
            addend) in the pure-code alternative.

            gcc/testsuite/
            PR target/96770
            * gcc.target/arm/pure-code/pr96770.c: New test.
  • [Bug target/96770] -mpure-code ... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to