From: Ramana Radhakrishnan Date: Wed, 28 Oct 2015 14:41:10 +0000 (+0000) Subject: Handle noplt in call expanders for AArch64. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb9678e7193f97b21d45d4cfe0534c7f22052563;p=gcc.git Handle noplt in call expanders for AArch64. 2015-10-28 Ramana Radhakrishnan * config/aarch64/aarch64.md (call, call_value, sibcall): Handle noplt. (sibcall_value): Likewise. From-SVN: r229488 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea88dfafd38..42cf7e28f5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-28 Ramana Radhakrishnan + + * config/aarch64/aarch64.md (call, call_value, sibcall): Handle noplt. + (sibcall_value): Likewise. + 2015-10-28 Nathan Sidwell * config/nvptx/nvptx.h (struct machine_function): Add diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 7c052ca34ac..82438f23c14 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -696,7 +696,8 @@ the branch-and-link. */ callee = XEXP (operands[0], 0); if (GET_CODE (callee) == SYMBOL_REF - ? aarch64_is_long_call_p (callee) + ? (aarch64_is_long_call_p (callee) + || aarch64_is_noplt_call_p (callee)) : !REG_P (callee)) XEXP (operands[0], 0) = force_reg (Pmode, callee); @@ -755,7 +756,8 @@ the branch-and-link. */ callee = XEXP (operands[1], 0); if (GET_CODE (callee) == SYMBOL_REF - ? aarch64_is_long_call_p (callee) + ? (aarch64_is_long_call_p (callee) + || aarch64_is_noplt_call_p (callee)) : !REG_P (callee)) XEXP (operands[1], 0) = force_reg (Pmode, callee); @@ -805,10 +807,11 @@ "" { rtx pat; - - if (!REG_P (XEXP (operands[0], 0)) - && (GET_CODE (XEXP (operands[0], 0)) != SYMBOL_REF)) - XEXP (operands[0], 0) = force_reg (Pmode, XEXP (operands[0], 0)); + rtx callee = XEXP (operands[0], 0); + if (!REG_P (callee) + && ((GET_CODE (callee) != SYMBOL_REF) + || aarch64_is_noplt_call_p (callee))) + XEXP (operands[0], 0) = force_reg (Pmode, callee); if (operands[2] == NULL_RTX) operands[2] = const0_rtx; @@ -835,10 +838,11 @@ "" { rtx pat; - - if (!REG_P (XEXP (operands[1], 0)) - && (GET_CODE (XEXP (operands[1], 0)) != SYMBOL_REF)) - XEXP (operands[1], 0) = force_reg (Pmode, XEXP (operands[1], 0)); + rtx callee = XEXP (operands[1], 0); + if (!REG_P (callee) + && ((GET_CODE (callee) != SYMBOL_REF) + || aarch64_is_noplt_call_p (callee))) + XEXP (operands[1], 0) = force_reg (Pmode, callee); if (operands[3] == NULL_RTX) operands[3] = const0_rtx;