Minor fix after resource.[ch] change

Jeffrey A Law law@cygnus.com
Wed Feb 3 11:01:00 GMT 1999


This avoids the build problems after the resource.[ch] change.

        * pa.c (insn_sets_and_refs_are_delayed): New function.
        * pa.h (INSN_SETS_ARE_DELAYED): Use it.
        (INSN_REFERENCES_ARE_DELAYED): Likewise.

Index: pa.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/pa.c,v
retrieving revision 1.27
diff -c -3 -p -r1.27 pa.c
*** pa.c	1999/01/15 01:03:43	1.27
--- pa.c	1999/02/03 18:55:21
*************** pa_can_combine_p (new, anchor, floater, 
*** 6436,6438 ****
--- 6436,6466 ----
    /* 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));
+ }
Index: pa.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/pa.h,v
retrieving revision 1.32
diff -c -3 -p -r1.32 pa.h
*** pa.h	1999/01/06 23:06:29	1.32
--- pa.h	1999/02/03 18:55:25
*************** while (0)
*** 2002,2020 ****
     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))
  
  
  /* Control the assembler format that we output.  */
--- 2002,2009 ----
     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) (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.  */
*************** extern int hppa_can_use_return_insn_p ()
*** 2526,2531 ****
--- 2515,2521 ----
  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.  */
  


More information about the Gcc-patches mailing list