[patch] Generalized access to MIPS coprocessor registers

Richard Henderson rth@redhat.com
Fri Apr 12 16:39:00 GMT 2002


On Fri, Apr 12, 2002 at 03:26:17PM -0700, Matt Hiller wrote:
> 	* config/mips/mips.h (COMPLETE_COPROCESSOR_DESCRIPTION_PROVIDED,
> 	COP0_REG_FIRST, COP0_REG_NUM, COP0_FIXED_REGISTERS,
> 	COP0_CALL_USED_REGISTERS, COP0_CALL_REALLY_USED_REGISTERS,
> 	COP0_REGSET, COP0_AND_GR_REGSET, COP0_REG_CLASS_LIST,
> 	COP0_REG_NAMES, COP0_SW_REG_NAMES, COP0_DEBUG_REGISTER_NAMES,
> 	COP1_REG_NUM, COP1_FIXED_REGISTERS,
> 	COP1_CALL_USED_REGISTERS, COP1_CALL_REALLY_USED_REGISTERS,
> 	COP1_REGSET, COP1_AND_GR_REGSET, COP1_REG_CLASS_LIST,
> 	COP1_REG_NAMES, COP1_SW_REG_NAMES, COP1_DEBUG_REGISTER_NAMES,
> 	COP2_REG_NUM, COP2_FIXED_REGISTERS,
> 	COP2_CALL_USED_REGISTERS, COP2_CALL_REALLY_USED_REGISTERS,
> 	COP2_REGSET, COP2_AND_GR_REGSET, COP2_REG_CLASS_LIST,
> 	COP2_REG_NAMES, COP2_SW_REG_NAMES, COP2_DEBUG_REGISTER_NAMES,
> 	COP3_REG_NUM, COP3_FIXED_REGISTERS,
> 	COP3_CALL_USED_REGISTERS, COP3_CALL_REALLY_USED_REGISTERS,
> 	COP3_REGSET, COP3_AND_GR_REGSET, COP3_REG_CLASS_LIST,
> 	COP3_REG_NAMES, COP3_SW_REG_NAMES, COP3_DEBUG_REGISTER_NAMES,
> 	ALL_COP_MIPS_CHAR_TO_CLASSES, ALL_COP_REG_ALLOC_ORDER,
> 	ALL_COP_ADDITIONAL_REGISTER_NAMES, ALL_COP_REGISTER_MOVE_COSTS,
> 	ALL_COP_CLASS_MAX_NREGS, ALL_COP_HARD_REGNO_MODE,
> 	ALL_COP_REGSET, ALL_COP_AND_GR_REGSET, ALL_REGSET): New macros,
> 	intended as programmer hooks.

You are working way too hard.  All of these should be handled 
normally.  If overrides are needed, then a specific target can
fiddle with the arrays in CONDITIONAL_REGISTER_USAGE.

You should also recall that the FP registers we already have
are COP1 registers, so you should only define three additional
register classes.

> 	* config/mips/mipscops.md: New file.

This is incorrect.  ALL move alternatives have to be in the same
instruction pattern.  Add these alternatives to the normal movsi
and movdi patterns.


r~



More information about the Gcc-patches mailing list