This is the mail archive of the gcc@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]

Re: ARCH_rtx_costs


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>


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