Fix long millicode calls on PA (3.1 branch)
John David Anglin
dave@hiauly1.hia.nrc.ca
Thu Apr 11 20:19:00 GMT 2002
This patch is a subset of the long call patch applied to the trunk. It
just fixes the regression caused by the introduction of the pattern which
calls the millicode function $$sh_func_adrs under hpux.
Bootstrapped and regtested under hppa2.0w-hp-hpux11.00.
Applied to 3.1 branch.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2002-04-11 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.c (output_millicode_call): Check attribute type as well as length
when length is 28.
Index: pa.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa.c,v
retrieving revision 1.148.2.1
diff -u -3 -p -r1.148.2.1 pa.c
--- pa.c 6 Mar 2002 05:20:29 -0000 1.148.2.1
+++ pa.c 11 Apr 2002 15:54:44 -0000
@@ -5872,9 +5872,13 @@ output_millicode_call (insn, call_dest)
/* Handle common case -- empty delay slot or no jump in the delay slot,
and we're sure that the branch will reach the beginning of the $CODE$
- subspace. */
+ subspace. The within reach form of the $$sh_func_adrs call has
+ a length of 28 and attribute type of multi. This length is the
+ same as the maximum length of an out of reach PIC call to $$div. */
if ((dbr_sequence_length () == 0
- && (get_attr_length (insn) == 8 || get_attr_length (insn) == 28))
+ && (get_attr_length (insn) == 8
+ || (get_attr_length (insn) == 28
+ && get_attr_type (insn) == TYPE_MULTI)))
|| (dbr_sequence_length () != 0
&& GET_CODE (NEXT_INSN (insn)) != JUMP_INSN
&& get_attr_length (insn) == 4))
@@ -5885,7 +5889,7 @@ output_millicode_call (insn, call_dest)
}
/* This call may not reach the beginning of the $CODE$ subspace. */
- if (get_attr_length (insn) > 4)
+ if (get_attr_length (insn) > 8)
{
int delay_insn_deleted = 0;
More information about the Gcc-patches
mailing list