[AArch64] Fix address printing on ILP32
authorWilco Dijkstra <wdijkstr@arm.com>
Fri, 1 Dec 2017 19:54:29 +0000 (19:54 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Fri, 1 Dec 2017 19:54:29 +0000 (19:54 +0000)
commitd65912578bc735658eecc5bf285af99bc1822920
tree55062a5dd197fb661a3817d0c061847b963860e7
parent8a302cb2b3cfc170254cf1d9fdc4dc2a681c15d1
[AArch64] Fix address printing on ILP32

Fix address printing for ILP32.  The md file uses 'a' in assembler
templates for symbolic addresses in adrp/add, which end up calling
aarch64_print_operand_address.  However in ILP32 these are not valid
memory addresses (being ptr_mode rather than Pmode), so the assert
triggers.  Since it is incorrect to use symbols in memory addresses
(besides literal pool accesses), change the 'a' to 'c' in the md file.

Skip one failing test in ILP32 which combines the 'p' modifier with the 'a'
assembler template to fake a memory reference.

    gcc/
* config/aarch64/aarch64.md (call_insn): Use %c rather than %a.
(call_value_insn): Likewise.
(sibcall_insn): Likewise.
(sibcall_value_insn): Likewise.
(movsi_aarch64): Likewise.
(movdi_aarch64): Likewise.
(add_losym_): Likewise.
(ldr_got_small_): Likewise.
(ldr_got_small_sidi): Likewise.
(ldr_got_small_28k_): Likewise.
(ldr_got_small_28k_sidi): Likewise.
* config/aarch64/aarch64.c (aarch64_print_address_internal):
Move output_addr_const to symbolic case. Add error check.
    testsuite/
* gcc.dg/asm-4.c: Skip on AArch64 with ILP32 as test is incorrect.

From-SVN: r255333
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/asm-4.c