This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ARCH_rtx_costs
- From: Eric Christopher <echristo at redhat dot com>
- To: Shinpei Kato <shinny at j02 dot itscom dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 07 Oct 2004 10:01:01 -0700
- Subject: Re: ARCH_rtx_costs
- References: <15817357.1097149594932.JavaMail.shinny@j02.itscom.net>
On Thu, 2004-10-07 at 04:46, Shinpei Kato wrote:
> Hi there,
>
> When porting gcc to own arch, we need to prepare $ARCH_rtx_costs, like mips_rtx_costs.
> I don't know how to calculate these costs.
> How could I achieve it?
> Which reference do I need to refer to? I think there are few helps about it in GCC internals.
> I need your help.
http://gcc.gnu.org/onlinedocs/gccint/Costs.html#Costs
Has most of the cost information you need, looking at a similar existing
port could help. What you want to remember in particular is that it's a
set of relative costs. For example, if your "fast" instruction is an
add, e.g. add $2, $3, $4, and takes one cycle and a multiply takes 12
cycles then you'd want to have a MULT cost COST_N_INSNS (12).
Good luck.
-eric
--
Eric Christopher <echristo@redhat.com>