Patchwork [committed] Fix long call support for indirect calls on hppa

login
register
mail settings
Submitter John David Anglin
Date Jan. 18, 2014, 12:49 a.m.
Message ID <BLU0-SMTP235BF0BB2444D7A2A4420997BB0@phx.gbl>
Download mbox | patch
Permalink /patch/312233/
State New
Headers show

Comments

John David Anglin - Jan. 18, 2014, 12:49 a.m.
The attached change fixes a problem detected building gcl.  A short  
call to $$dyncall was sometimes
output when doing long call sequences.  This caused a link error.

Tested on hppa2.0-hp-hpux11.11, hppa64-hp-hpux11.11 and hppa-unknown- 
linux-gnu.  Committed
to active branches.

Dave
--
John David Anglin	dave.anglin@bell.net
2014-01-17  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/pa.c (pa_attr_length_indirect_call): Don't output a short
	call to $$dyncall when TARGET_LONG_CALLS is true.

Patch

Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c	(revision 206593)
+++ config/pa/pa.c	(working copy)
@@ -8099,7 +8093,8 @@ 
     return 12;
 
   if (TARGET_FAST_INDIRECT_CALLS
-      || (!TARGET_PORTABLE_RUNTIME
+      || (!TARGET_LONG_CALLS
+	  && !TARGET_PORTABLE_RUNTIME
 	  && ((TARGET_PA_20 && !TARGET_SOM && distance < 7600000)
 	      || distance < MAX_PCREL17F_OFFSET)))
     return 8;