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.

Dave
--
John David Anglin       dave.ang...@bell.net


2014-08-30  John David Anglin  <dang...@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.  */
+      if (!TARGET_FAST_INDIRECT_CALLS)
+       fputs ("P%", asm_out_file);
+
       output_addr_const (asm_out_file, x);
       fputc ('\n', asm_out_file);
       return true;

Reply via email to