From b9cd54d2655fc42a34fc7d204122ec7e154a89d8 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Wed, 3 Feb 1999 11:01:19 +0000 Subject: pa.c (insn_sets_and_refs_are_delayed): New function. * pa.c (insn_sets_and_refs_are_delayed): New function. * pa.h (INSN_SETS_ARE_DELAYED): Use it. (INSN_REFERENCES_ARE_DELAYED): Likewise. From-SVN: r25003 --- gcc/ChangeLog | 6 ++++++ gcc/config/pa/pa.c | 28 ++++++++++++++++++++++++++++ gcc/config/pa/pa.h | 16 +++------------- 3 files changed, 37 insertions(+), 13 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 138370f..267f494 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 3 11:56:23 1999 Jeffrey A Law (law@cygnus.com) + + * pa.c (insn_sets_and_refs_are_delayed): New function. + * pa.h (INSN_SETS_ARE_DELAYED): Use it. + (INSN_REFERENCES_ARE_DELAYED): Likewise. + Wed Feb 3 06:24:49 1999 Richard Earnshaw (rearnsha@arm.com) * config/arm/t-arm-elf (LIBGCC2_CFLAGS): Delete. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 2bae75c..82a69c4 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -6436,3 +6436,31 @@ pa_can_combine_p (new, anchor, floater, reversed, dest, src1, src2) /* If we get here, then everything is good. */ return 1; } + +/* Return nonzero if sets and references for INSN are delayed. + + Millicode insns are actually function calls with some special + constraints on arguments and register usage. + + Millicode calls always expect their arguments in the integer argument + registers, and always return their result in %r29 (ret1). They + are expected to clobber their arguments, %r1, %r29, and %r31 and + nothing else. + + By considering this effects delayed reorg reorg can put insns + which set the argument registers into the delay slot of the millicode + call -- thus they act more like traditional CALL_INSNs. + + get_attr_type will try to recognize the given insn, so make sure to + filter out things it will not accept -- SEQUENCE, USE and CLOBBER insns + in particular. */ +int +insn_sets_and_refs_are_delayed (insn) + rtx insn; +{ + return ((GET_CODE (insn) == INSN + && GET_CODE (PATTERN (insn)) != SEQUENCE + && GET_CODE (PATTERN (insn)) != USE + && GET_CODE (PATTERN (insn)) != CLOBBER + && get_attr_type (insn) == TYPE_MILLI)); +} diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index d25e0d2..bc28d13 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -2002,19 +2002,8 @@ while (0) get_attr_type will try to recognize the given insn, so make sure to filter out things it will not accept -- SEQUENCE, USE and CLOBBER insns in particular. */ -#define INSN_SETS_ARE_DELAYED(X) \ - ((GET_CODE (X) == INSN \ - && GET_CODE (PATTERN (X)) != SEQUENCE \ - && GET_CODE (PATTERN (X)) != USE \ - && GET_CODE (PATTERN (X)) != CLOBBER \ - && get_attr_type (X) == TYPE_MILLI)) - -#define INSN_REFERENCES_ARE_DELAYED(X) \ - ((GET_CODE (X) == INSN \ - && GET_CODE (PATTERN (X)) != SEQUENCE \ - && GET_CODE (PATTERN (X)) != USE \ - && GET_CODE (PATTERN (X)) != CLOBBER \ - && get_attr_type (X) == TYPE_MILLI)) +#define INSN_SETS_ARE_DELAYED(X) (insn_sets_and_refs_are_delayed (X)) +#define INSN_REFERENCES_ARE_DELAYED(X) (insn_sets_and_refs_are_delayed (X)) /* Control the assembler format that we output. */ @@ -2526,6 +2515,7 @@ extern int hppa_can_use_return_insn_p (); extern int is_function_label_plus_const (); extern int jump_in_call_delay (); extern enum reg_class secondary_reload_class (); +extern int insn_sets_and_refs_are_delayed (); /* Declare functions defined in pa.c and used in templates. */ -- cgit v1.1