This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: AVR signed int / 2 divide
- To: marekm at linux dot org dot pl
- Subject: Re: AVR signed int / 2 divide
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 04 May 2000 09:58:04 -0600
- cc: gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <20000504102749Z116305-15759+18@piast.t19.ds.pwr.wroc.pl>you write
:
> I suggest to make this condition a macro which a target can
> define in its preferred way (if not defined, use the current
> condition by default). (This is just my suggestion, please
> feel free to suggest better solutions if there are any.)
I think it would be better to use BRANCH_COST to determine the cost
of the branch and RTX_COST to determine the cost of a shift (and other
RTL operations). Then select the cheaper one.
That is better because it uses existing target macros in an obvious
way intead of creating a new target macro which just controls this
behavior.
jeff