diff -urpN a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md --- a/gcc/config/aarch64/aarch64.md 2018-10-09 11:30:50.000000000 +0800 +++ b/gcc/config/aarch64/aarch64.md 2018-10-09 11:52:54.000000000 +0800 @@ -857,6 +857,13 @@ : !REG_P (callee)) XEXP (operands[0], 0) = force_reg (Pmode, callee); + if (TARGET_ILP32 + && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF + && GET_MODE (XEXP (operands[0], 0)) == SImode) + XEXP (operands[0], 0) = convert_memory_address (DImode, + XEXP (operands[0], 0)); + + if (operands[2] == NULL_RTX) operands[2] = const0_rtx; @@ -889,6 +896,13 @@ : !REG_P (callee)) XEXP (operands[1], 0) = force_reg (Pmode, callee); + if (TARGET_ILP32 + && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF + && GET_MODE (XEXP (operands[1], 0)) == SImode) + XEXP (operands[1], 0) = convert_memory_address (DImode, + XEXP (operands[1], 0)); + + if (operands[3] == NULL_RTX) operands[3] = const0_rtx;