diff mbox

[Committed] S/390: Fix 64 bit sibcall

Message ID 1454675970-24258-1-git-send-email-krebbel@linux.vnet.ibm.com
State New
Headers show

Commit Message

Andreas Krebbel Feb. 5, 2016, 12:39 p.m. UTC
This fixes a problem revealed during the split-stack work:
https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00322.html

Bootstrapped on s390x. No regressions.

Committed to mainline. Needs to be committed to 4.9.x and 5.x as well.

Bye,

-Andreas-

gcc/ChangeLog:

2016-02-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390.c (s390_emit_call): Add missing 64 bit check.
---
 gcc/config/s390/s390.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 3be64de..c8f66c6 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -12470,7 +12470,7 @@  s390_emit_call (rtx addr_location, rtx tls_call, rtx result_reg,
          replace the symbol itself with the PLT stub.  */
       if (flag_pic && !SYMBOL_REF_LOCAL_P (addr_location))
         {
-	  if (retaddr_reg != NULL_RTX)
+	  if (TARGET_64BIT || retaddr_reg != NULL_RTX)
 	    {
 	      addr_location = gen_rtx_UNSPEC (Pmode,
 					      gen_rtvec (1, addr_location),