[AArch64] Fix ICEs in aarch64_print_operand
Three related regression fixes:
- We can't use asserts like:
gcc_assert (GET_MODE_SIZE (mode) == 16);
in aarch64_print_operand because it could trigger for invalid user input.
- The output_operand_lossage in aarch64_print_address_internal:
output_operand_lossage ("invalid operand for '%%%c'", op);
wasn't right because "op" is an rtx_code enum rather than the
prefix character.
- aarch64_print_operand_address shouldn't call output_operand_lossage
(because it doesn't have a prefix code) but instead fall back to
output_addr_const.
2017-12-05 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* config/aarch64/aarch64.c (aarch64_print_address_internal): Return
a bool success value. Don't call output_operand_lossage here.
(aarch64_print_ldpstp_address): Return a bool success value.
(aarch64_print_operand_address): Call output_addr_const if
aarch64_print_address_internal fails.
(aarch64_print_operand): Don't assert that the mode is 16 bytes for
'y'; call output_operand_lossage instead. Call output_operand_lossage
if aarch64_print_ldpstp_address fails.
gcc/testsuite/
* gcc.target/aarch64/asm-2.c: New test.
* gcc.target/aarch64/asm-3.c: Likewise.
From-SVN: r255481