]> gcc.gnu.org Git - gcc.git/commit
[AArch64] Tighten move constraints for symbolic operands
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 8 May 2017 16:18:49 +0000 (16:18 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 8 May 2017 16:18:49 +0000 (16:18 +0000)
commit564cf83d79d6199de7ea9eb047aa3a244d9bb52e
treec00db1079680faf7d686217a0571e3bf935577cc
parent06aa5490059800ce9253abecf6135478e96cc28c
[AArch64] Tighten move constraints for symbolic operands

The movsi and movdi constraints allowed the source to be any
absolute symbolic expression ("S").  That's OK for operands that
have already been vetted by the aarch64_mov_operand predicate but
causes problems if the register allocator substitutes an equivalence
(the usual "the constraints can't accept more than the predicates"
restriction).

Although all other uses of "S" in the backend are redundant and could
in principle be removed, "S" itself is a publicly-documented constraint
and so we'd have to keep its definition.  This patch therefore adds a
new "Usa" constraint for legitimate absolute address operands.

2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/aarch64/constraints.md (Usa): New constraint.
* config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.

From-SVN: r247746
gcc/ChangeLog
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/constraints.md
This page took 0.061244 seconds and 5 git commands to generate.