[committed] Don't request function descriptors when generating fast indirect calls on hppa

Message ID BLU436-SMTP2183ED1A27BD39F15FDDF8997D80@phx.gbl
State New
Headers show

Commit Message

John David Anglin Aug. 30, 2014, 3:40 p.m.
The attached change fixes a rather old regression.  The code that is  
generated with fast
indirect calls assumes that a function pointer points directly at the  
function being called,
not a procedure descriptor.

Tested on hppa-unknown-linux-gnu and hppa2.0w-hp-hpux11.11.  Committed  
to trunk,
4.9 and 4.8.

John David Anglin	dave.anglin@bell.net
2014-08-30  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
	prefix to function labels when generating fast indirect calls.


Index: config/pa/pa.c
--- config/pa/pa.c	(revision 214400)
+++ config/pa/pa.c	(working copy)
@@ -3217,7 +3217,12 @@ 
       && aligned_p
       && function_label_operand (x, VOIDmode))
-      fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
+      fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
+      /* We don't want an OPD when generating fast indirect calls.  */
+	fputs ("P%", asm_out_file);
       output_addr_const (asm_out_file, x);
       fputc ('\n', asm_out_file);
       return true;