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]

Question on RTX_COST


I have a question as to how the RTX_COST macro should be defined for a
particular processor. The docs. indicate that the macro expresses the
"relative" costs of a operation. My questions are:

1.) What are the costs relative to (i.e how should I think about costs
and their impact on cse)?
2.) Do the costs reflect the number of cycles or the size of an
instruction?

Additionally I do not understand the macro COSTS_N_INSNS (which is
defined as N * 4 -2). What does it reflect? Looking at its definition
gives no clue. Normally I look at other machine ports to see how they
define things but there is no common thread. Some ports use
COSTS_N_INSNS, and some just return numbers. What is the right thing to
do here?

Mike

-- 
Michael Collison
Maker Communications
mkc@maker.com
(508) 766-3297


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