diff options
author | Yvan Roux <yvan.roux@linaro.org> | 2017-08-16 11:08:35 +0200 |
---|---|---|
committer | Yvan Roux <yvan.roux@linaro.org> | 2017-08-16 17:42:05 +0000 |
commit | 818c3fa734f8901a32080a428ce705c286d8a1b8 (patch) | |
tree | 694c106508e0dd5b3733c71aebc4342206a6efd4 | |
parent | 3839db4dcb5ccf0d9c1d138a9dbca95f50d59fc0 (diff) |
gcc/
Backport from trunk r249741.
2017-06-28 Wilco Dijkstra <wdijkstr@arm.com>
* config/aarch64/aarch64 (aarch64_expand_mov_immediate):
Convert memory address to Pmode.
(aarch64_print_operand): Assert MEM operands are always Pmode.
Change-Id: I4bb5418d1f53d4a08fc3145f40a62458ee978122
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 411bdeced26..8edecd00ddb 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -2002,6 +2002,8 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm) gcc_assert (can_create_pseudo_p ()); base = gen_reg_rtx (ptr_mode); aarch64_expand_mov_immediate (base, XEXP (mem, 0)); + if (ptr_mode != Pmode) + base = convert_memory_address (Pmode, base); mem = gen_rtx_MEM (ptr_mode, base); } @@ -5265,6 +5267,8 @@ aarch64_print_operand (FILE *f, rtx x, int code) case MEM: output_address (GET_MODE (x), XEXP (x, 0)); + /* Check all memory references are Pmode - even with ILP32. */ + gcc_assert (GET_MODE (XEXP (x, 0)) == Pmode); break; case CONST: |