[AArch64] Tighten move constraints for symbolic operands
commit564cf83d79d6199de7ea9eb047aa3a244d9bb52e
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 8 May 2017 16:18:49 +0000 (8 16:18 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 8 May 2017 16:18:49 +0000 (8 16:18 +0000)
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