diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2020-11-02 07:34:50 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2020-11-02 07:34:50 +0000 |
commit | c3c3e2c9e88e25a410a2fe089782b094e911bb39 (patch) | |
tree | cc599d3f1f27e0a044f7d9ac74490aacb5131139 /gcc/tree-vect-loop.c | |
parent | 4d9af90d6a216822fe117337fb9836ba656dc3af (diff) | |
download | gcc-c3c3e2c9e88e25a410a2fe089782b094e911bb39.zip gcc-c3c3e2c9e88e25a410a2fe089782b094e911bb39.tar.gz gcc-c3c3e2c9e88e25a410a2fe089782b094e911bb39.tar.bz2 |
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.lyon@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.
Diffstat (limited to 'gcc/tree-vect-loop.c')
0 files changed, 0 insertions, 0 deletions