PATCH: H8/300 BRANCH_COST fix

tm tm@mail.kloo.net
Wed Apr 24 17:59:00 GMT 2002


Branches are not free on the H8/300! (would be nice, though)

Toshi

2002-04-24  Toshiyasu Morita  <toshiyasu.morita@hsa.hitachi.com>

	* config/h8300/h8300.h (BRANCH_COST): Fix cost

*** h8300.h.orig	Wed Apr 24 16:55:32 2002
--- h8300.h	Wed Apr 24 17:00:27 2002
*************** struct cum_arg
*** 999,1005 ****
  #define DEFAULT_RTX_COSTS(RTX, CODE, OUTER_CODE) \
    return (const_costs (RTX, CODE, OUTER_CODE));
  
! #define BRANCH_COST 0
  
  /* We say that MOD and DIV are so cheap because otherwise we'll
     generate some really horrible code for division of a power of two.  */
--- 999,1008 ----
  #define DEFAULT_RTX_COSTS(RTX, CODE, OUTER_CODE) \
    return (const_costs (RTX, CODE, OUTER_CODE));
  
! /* Branches require 4 states on the H8/300 and H8/300H.
!    On the H8S, they only require 2 states, but all the other instructions
!    are twice as fast also, so the relative cost is the same.  */
! #define BRANCH_COST 4
  
  /* We say that MOD and DIV are so cheap because otherwise we'll
     generate some really horrible code for division of a power of two.  */



More information about the Gcc-patches mailing list