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

Re: i386 MEMORY_MOVE_COST/REGISTER_MOVE_COST fix


On Sat, Jul 29, 2000 at 12:07:57AM +0200, Jan Hubicka wrote:
> 	* i386.c (i386_cost, i486_cost, pentium_cost, pentiumpro_cost,
> 	k6_cost, athlon_cost): Add costs for SSE/MMX moves.
> 	* i386.h (struct processor_costs): Add SSE/MMX move costs.
> 	(REGISTER_MOVE_COST, MEMORY_MOVE_COST): Compute properly
> 	the MMX/SSE move costs.

I'd like to see these cost functions moved out of line.

> !   (((FLOAT_CLASS_P (CLASS1) && ! FLOAT_CLASS_P (CLASS2))	\
> !     || (! FLOAT_CLASS_P (CLASS1) && FLOAT_CLASS_P (CLASS2)))	\
> !    ? (MEMORY_MOVE_COST (XFmode, CLASS1, 0)			\
> !      + MEMORY_MOVE_COST (XFmode, CLASS2, 1))			\
> !    : (((CLASS1) == MMX_REGS && (CLASS2) == SSE_REGS)		\
> !       || ((CLASS1) == SSE_REGS && (CLASS2) == MMX_REGS))	\
> !    ? (MEMORY_MOVE_COST (DImode, CLASS1, 0)			\
> !      + MEMORY_MOVE_COST (DImode, CLASS2, 1))			\
>      : ((CLASS1) == MMX_REGS) != ((CLASS2) == MMX_REGS) ? 3	\
>      : 2)

This doesn't seem complete.  DImode moves from GENERAL_REGS
and moves between SSE and !SSE are not represented.



r~

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