diff mbox

PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

Message ID 5630DEEF.4080509@foss.arm.com
State New
Headers show

Commit Message

Ramana Radhakrishnan Oct. 28, 2015, 2:42 p.m. UTC
> 
> This thread seems destined to cause typos and finger slips...
> 
>      if (!REG_P (callee)
>         && ((GET_CODE (callee) != SYMBOL_REF)
>  	     || aarch64_is_noplt_call_p (callee)))
> 
> Obviously :).

Sigh, Yeah it is one of those patches. Applied to trunk with the changes.

Ramana

> 
> Thanks,
> James
>
diff mbox

Patch

Index: gcc/config/aarch64/aarch64.md
===================================================================
--- gcc/config/aarch64/aarch64.md	(revision 229482)
+++ gcc/config/aarch64/aarch64.md	(working copy)
@@ -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,11 +807,12 @@ 
   ""
   {
     rtx pat;
+    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 (!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));
-
     if (operands[2] == NULL_RTX)
       operands[2] = const0_rtx;
 
@@ -835,11 +838,12 @@ 
   ""
   {
     rtx pat;
+    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 (!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));
-
     if (operands[3] == NULL_RTX)
       operands[3] = const0_rtx;