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]

[Patch] MIPS: Add mult/div costs for 4K/24K CPUs.


This patch adds the rtx_cost to the mips_rtx_cost_data structure for the
CPUs 4kc, 4kp, 24k and 24kx.
This patch should be painless.  :)

David.

2005-06-14  David Ung  <davidu@mips.com>

	* config/mips/mips.c (mips_rtx_cost_data): Add cost for 4kc, 4kp,
	24k and 24kx.

Index: gcc/config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.510
diff -c -p -b -r1.510 mips.c
*** gcc/config/mips/mips.c	5 Jun 2005 08:12:04 -0000	1.510
--- gcc/config/mips/mips.c	14 Jun 2005 14:32:07 -0000
*************** static struct mips_rtx_cost_data const m
*** 751,760 ****
  
      },
      { /* 4KC */
!       DEFAULT_COSTS
      },
      { /* 4KP */
!       DEFAULT_COSTS
      },
      { /* 5KC */
        DEFAULT_COSTS
--- 751,772 ----
  
      },
      { /* 4KC */
!       SOFT_FP_COSTS,
!       COSTS_N_INSNS (6),            /* int_mult_si */
!       COSTS_N_INSNS (6),            /* int_mult_di */
!       COSTS_N_INSNS (36),           /* int_div_si */
!       COSTS_N_INSNS (36),           /* int_div_di */
!                        1,           /* branch_cost */
!                        4            /* memory_latency */
      },
      { /* 4KP */
!       SOFT_FP_COSTS,
!       COSTS_N_INSNS (36),           /* int_mult_si */
!       COSTS_N_INSNS (36),           /* int_mult_di */
!       COSTS_N_INSNS (37),           /* int_div_si */
!       COSTS_N_INSNS (37),           /* int_div_di */
!                        1,           /* branch_cost */
!                        4            /* memory_latency */
      },
      { /* 5KC */
        DEFAULT_COSTS
*************** static struct mips_rtx_cost_data const m
*** 763,772 ****
        DEFAULT_COSTS
      },
      { /* 24k */
!       DEFAULT_COSTS
      },
      { /* 24kx */
!       DEFAULT_COSTS
      },
      { /* M4k */
        DEFAULT_COSTS
--- 775,804 ----
        DEFAULT_COSTS
      },
      { /* 24k */
!       COSTS_N_INSNS (8),            /* fp_add */
!       COSTS_N_INSNS (8),            /* fp_mult_sf */
!       COSTS_N_INSNS (10)            /* fp_mult_df */
!       COSTS_N_INSNS (34),           /* fp_div_sf */
!       COSTS_N_INSNS (64),           /* fp_div_df */
!       COSTS_N_INSNS (5),            /* int_mult_si */
!       COSTS_N_INSNS (5),            /* int_mult_di */
!       COSTS_N_INSNS (41),           /* int_div_si */
!       COSTS_N_INSNS (41),           /* int_div_di */
!                        1,           /* branch_cost */
!                        4            /* memory_latency */
      },
      { /* 24kx */
!       COSTS_N_INSNS (4),            /* fp_add */
!       COSTS_N_INSNS (4),            /* fp_mult_sf */
!       COSTS_N_INSNS (5),            /* fp_mult_df */
!       COSTS_N_INSNS (17),           /* fp_div_sf */
!       COSTS_N_INSNS (32),           /* fp_div_df */
!       COSTS_N_INSNS (5),            /* int_mult_si */
!       COSTS_N_INSNS (5),            /* int_mult_di */
!       COSTS_N_INSNS (41),           /* int_div_si */
!       COSTS_N_INSNS (41),           /* int_div_di */
!                        1,           /* branch_cost */
!                        4            /* memory_latency */
      },
      { /* M4k */
        DEFAULT_COSTS


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