]> git.ipfire.org Git - thirdparty/gcc.git/commit
[AArch64] Fix address printing on ILP32
authorwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Dec 2017 19:54:29 +0000 (19:54 +0000)
committerwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Dec 2017 19:54:29 +0000 (19:54 +0000)
commitc43158c917c87591d6a05c68184ddf5fdc3d7d35
tree55062a5dd197fb661a3817d0c061847b963860e7
parente9366ef982b987178ec87e70ae03e10dd92c3b29
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255333 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/asm-4.c