This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix PR target/34525 - unrecognized insn


The enclosed change fixes PR target/34525.  An unrecognized instruction
was generated because a function label was not forced to memory.

Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11.  Committed
to trunk.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2007-12-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR target/34525
	* pa.c (legitimize_pic_address): Force function labels into memory.

Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c	(revision 131051)
+++ config/pa/pa.c	(working copy)
@@ -694,6 +694,10 @@
       tmp_reg = ((reload_in_progress || reload_completed)
 		 ? reg : gen_reg_rtx (Pmode));
 
+      /* Force function labels into memory.  */
+      if (function_label_operand (orig, mode))
+	orig = force_const_mem (mode, orig);
+
       emit_move_insn (tmp_reg,
 		      gen_rtx_PLUS (word_mode, pic_offset_table_rtx,
 				    gen_rtx_HIGH (word_mode, orig)));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]