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]

More rs6000 scheduling information


	* rs6000.h (processor_type): Add PPC405.
	(RTX_COSTS): Add PPC405.  Correct rs64 and ppc630 multiply costs.
	* rs6000.md: Add PPC405 information.  Utilize imul2 and imul3 for
	rios1, rs64, and ppc630 processors.

Index: rs6000.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.156
diff -c -p -r1.156 rs6000.h
*** rs6000.h	2001/12/09 20:13:15	1.156
--- rs6000.h	2001/12/10 22:22:12
*************** enum processor_type
*** 382,387 ****
--- 382,388 ----
     PROCESSOR_RS64A,
     PROCESSOR_MPCCORE,
     PROCESSOR_PPC403,
+    PROCESSOR_PPC405,
     PROCESSOR_PPC601,
     PROCESSOR_PPC603,
     PROCESSOR_PPC604,
*************** do {									     \
*** 2306,2311 ****
--- 2307,2313 ----
      switch (rs6000_cpu)							\
        {									\
        case PROCESSOR_RIOS1:						\
+       case PROCESSOR_PPC405:						\
          return (GET_CODE (XEXP (X, 1)) != CONST_INT			\
  		? COSTS_N_INSNS (5)					\
  		: INTVAL (XEXP (X, 1)) >= -256 && INTVAL (XEXP (X, 1)) <= 255 \
*************** do {									     \
*** 2315,2321 ****
  		? GET_MODE (XEXP (X, 1)) != DImode			\
  		? COSTS_N_INSNS (20) : COSTS_N_INSNS (34)		\
  		: INTVAL (XEXP (X, 1)) >= -256 && INTVAL (XEXP (X, 1)) <= 255 \
! 		? COSTS_N_INSNS (12) : COSTS_N_INSNS (14));		\
        case PROCESSOR_RIOS2:						\
        case PROCESSOR_MPCCORE:						\
        case PROCESSOR_PPC604e:						\
--- 2317,2323 ----
  		? GET_MODE (XEXP (X, 1)) != DImode			\
  		? COSTS_N_INSNS (20) : COSTS_N_INSNS (34)		\
  		: INTVAL (XEXP (X, 1)) >= -256 && INTVAL (XEXP (X, 1)) <= 255 \
! 		? COSTS_N_INSNS (8) : COSTS_N_INSNS (12));		\
        case PROCESSOR_RIOS2:						\
        case PROCESSOR_MPCCORE:						\
        case PROCESSOR_PPC604e:						\
*************** do {									     \
*** 2337,2343 ****
        case PROCESSOR_PPC630:						\
          return (GET_CODE (XEXP (X, 1)) != CONST_INT			\
  		? GET_MODE (XEXP (X, 1)) != DImode			\
! 		? COSTS_N_INSNS (4) : COSTS_N_INSNS (7)			\
  		: INTVAL (XEXP (X, 1)) >= -256 && INTVAL (XEXP (X, 1)) <= 255 \
  		? COSTS_N_INSNS (3) : COSTS_N_INSNS (4));		\
        }									\
--- 2339,2345 ----
        case PROCESSOR_PPC630:						\
          return (GET_CODE (XEXP (X, 1)) != CONST_INT			\
  		? GET_MODE (XEXP (X, 1)) != DImode			\
! 		? COSTS_N_INSNS (5) : COSTS_N_INSNS (7)			\
  		: INTVAL (XEXP (X, 1)) >= -256 && INTVAL (XEXP (X, 1)) <= 255 \
  		? COSTS_N_INSNS (3) : COSTS_N_INSNS (4));		\
        }									\
*************** do {									     \
*** 2363,2368 ****
--- 2365,2372 ----
  	return COSTS_N_INSNS (6);					\
        case PROCESSOR_PPC403:						\
  	return COSTS_N_INSNS (33);					\
+       case PROCESSOR_PPC405:						\
+ 	return COSTS_N_INSNS (35);					\
        case PROCESSOR_PPC601:						\
  	return COSTS_N_INSNS (36);					\
        case PROCESSOR_PPC603:						\
Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.145
diff -c -p -r1.145 rs6000.md
*** rs6000.md	2001/12/09 18:49:30	1.145
--- rs6000.md	2001/12/10 22:22:13
***************
*** 56,62 ****
  ;; Processor type -- this attribute must exactly match the processor_type
  ;; enumeration in rs6000.h.
  
! (define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450"
    (const (symbol_ref "rs6000_cpu_attr")))
  
  ; (define_function_unit NAME MULTIPLICITY SIMULTANEITY
--- 56,62 ----
  ;; Processor type -- this attribute must exactly match the processor_type
  ;; enumeration in rs6000.h.
  
! (define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450"
    (const (symbol_ref "rs6000_cpu_attr")))
  
  ; (define_function_unit NAME MULTIPLICITY SIMULTANEITY
***************
*** 111,122 ****
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "load")
!        (eq_attr "cpu" "rios1,ppc403,ppc601"))
    2 1)
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "store,fpstore")
!        (eq_attr "cpu" "rios1,ppc403,ppc601"))
    1 1)
  
  (define_function_unit "fpu" 1 0
--- 111,122 ----
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "load")
!        (eq_attr "cpu" "rios1,ppc403,ppc405,ppc601"))
    2 1)
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "store,fpstore")
!        (eq_attr "cpu" "rios1,ppc403,ppc405,ppc601"))
    1 1)
  
  (define_function_unit "fpu" 1 0
***************
*** 147,158 ****
  ; Integer Unit (RIOS1, PPC601, PPC603, RS64a)
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "integer")
!        (eq_attr "cpu" "rios1,rs64a,mpccore,ppc403,ppc601,ppc603"))
    1 1)
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "cr_logical")
!        (eq_attr "cpu" "mpccore,ppc403,ppc601"))
    1 1)
  
  (define_function_unit "iu" 1 0
--- 147,158 ----
  ; Integer Unit (RIOS1, PPC601, PPC603, RS64a)
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "integer")
!        (eq_attr "cpu" "rios1,rs64a,mpccore,ppc403,ppc405,ppc601,ppc603"))
    1 1)
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "cr_logical")
!        (eq_attr "cpu" "mpccore,ppc403,ppc405,ppc601"))
    1 1)
  
  (define_function_unit "iu" 1 0
***************
*** 161,176 ****
    4 4)
  
  (define_function_unit "iu" 1 0
!   (and (eq_attr "type" "imul,imul2,imul3")
!        (eq_attr "cpu" "rios1,ppc601,ppc603"))
    5 5)
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "imul,imul2,imul3")
         (eq_attr "cpu" "rs64a"))
!   20 14)
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "lmul")
         (eq_attr "cpu" "rs64a"))
    34 34)
--- 161,211 ----
    4 4)
  
  (define_function_unit "iu" 1 0
!   (and (eq_attr "type" "imul")
!        (eq_attr "cpu" "ppc405"))
!   4 3)
! 
! (define_function_unit "iu" 1 0
!   (and (eq_attr "type" "imul2,imul3")
!        (eq_attr "cpu" "ppc405"))
!   3 2)
! 
! (define_function_unit "iu" 1 0
!   (and (eq_attr "type" "imul")
!        (eq_attr "cpu" "rios1"))
    5 5)
  
  (define_function_unit "iu" 1 0
+   (and (eq_attr "type" "imul2")
+        (eq_attr "cpu" "rios1"))
+   4 4)
+ 
+ (define_function_unit "iu" 1 0
+   (and (eq_attr "type" "imul3")
+        (eq_attr "cpu" "rios1"))
+   3 3)
+ 
+ (define_function_unit "iu" 1 0
    (and (eq_attr "type" "imul,imul2,imul3")
+        (eq_attr "cpu" "ppc601,ppc603"))
+   5 5)
+ 
+ (define_function_unit "iu" 1 0
+   (and (eq_attr "type" "imul")
+        (eq_attr "cpu" "rs64a"))
+   20 20)
+ 
+ (define_function_unit "iu" 1 0
+   (and (eq_attr "type" "imul2")
         (eq_attr "cpu" "rs64a"))
!   12 12)
  
  (define_function_unit "iu" 1 0
+   (and (eq_attr "type" "imul3")
+        (eq_attr "cpu" "rs64a"))
+   8 8)
+ 
+ (define_function_unit "iu" 1 0
    (and (eq_attr "type" "lmul")
         (eq_attr "cpu" "rs64a"))
    34 34)
***************
*** 197,202 ****
--- 232,242 ----
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "idiv")
+        (eq_attr "cpu" "ppc405"))
+   35 35)
+ 
+ (define_function_unit "iu" 1 0
+   (and (eq_attr "type" "idiv")
         (eq_attr "cpu" "ppc601"))
    36 36)
  
***************
*** 262,279 ****
  
  (define_function_unit "imuldiv" 1 0
    (and (eq_attr "type" "imul,imul2,imul3")
         (eq_attr "cpu" "ppc620,ppc630"))
    5 3)
  
  (define_function_unit "imuldiv" 1 0
!   (and (eq_attr "type" "lmul")
         (eq_attr "cpu" "ppc620,ppc630"))
!   5 3)
  
  (define_function_unit "imuldiv" 1 0
!   (and (eq_attr "type" "imul,imul2,imul3")
!        (eq_attr "cpu" "ppc604e"))
!   2 1)
  
  (define_function_unit "imuldiv" 1 0
    (and (eq_attr "type" "idiv")
--- 302,329 ----
  
  (define_function_unit "imuldiv" 1 0
    (and (eq_attr "type" "imul,imul2,imul3")
+        (eq_attr "cpu" "ppc604e"))
+   2 1)
+ 
+ (define_function_unit "imuldiv" 1 0
+   (and (eq_attr "type" "imul")
         (eq_attr "cpu" "ppc620,ppc630"))
    5 3)
  
  (define_function_unit "imuldiv" 1 0
!   (and (eq_attr "type" "imul2")
         (eq_attr "cpu" "ppc620,ppc630"))
!   4 3)
  
  (define_function_unit "imuldiv" 1 0
!   (and (eq_attr "type" "imul3")
!        (eq_attr "cpu" "ppc620,ppc630"))
!   3 3)
! 
! (define_function_unit "imuldiv" 1 0
!   (and (eq_attr "type" "lmul")
!        (eq_attr "cpu" "ppc620,ppc630"))
!   7 5)
  
  (define_function_unit "imuldiv" 1 0
    (and (eq_attr "type" "idiv")
***************
*** 439,445 ****
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "compare,delayed_compare")
!        (eq_attr "cpu" "rs64a,mpccore,ppc403,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630"))
    3 1)
  
  ; some extra cycles added by TARGET_SCHED_ADJUST_COST between compare
--- 489,495 ----
  
  (define_function_unit "iu" 1 0
    (and (eq_attr "type" "compare,delayed_compare")
!        (eq_attr "cpu" "rs64a,mpccore,ppc403,ppc405,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630"))
    3 1)
  
  ; some extra cycles added by TARGET_SCHED_ADJUST_COST between compare
***************
*** 503,509 ****
  
  (define_function_unit "bpu" 1 0
    (and (eq_attr "type" "mtjmpr")
!        (eq_attr "cpu" "mpccore,ppc403,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630"))
    4 1)
  
  (define_function_unit "sru" 1 0
--- 553,559 ----
  
  (define_function_unit "bpu" 1 0
    (and (eq_attr "type" "mtjmpr")
!        (eq_attr "cpu" "mpccore,ppc403,ppc405,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630"))
    4 1)
  
  (define_function_unit "sru" 1 0


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