mips.c (mips_class_max_nregs, [...]): New functions.
authorMatt Hiller <hiller@redhat.com>
Thu, 25 Apr 2002 19:31:45 +0000 (19:31 +0000)
committerMatthew Hiller <hiller@gcc.gnu.org>
Thu, 25 Apr 2002 19:31:45 +0000 (19:31 +0000)
commitd604bca36430702c878d4e4cca1e8e0ccee35124
tree3f73c185f3047203d3682074bdd5aa45213cb02e
parentb9a26d0920dd12f8595a1f193c7db2045f9eb7d0
mips.c (mips_class_max_nregs, [...]): New functions.

2002-04-24  Matt Hiller  <hiller@redhat.com>

* mips.c (mips_class_max_nregs, mips_register_move_cost): New
functions.
* mips.h (CLASS_MAX_NREGS, REGISTER_MOVE_COST): Redefine as calls
of the corresponding functions.
* mips-protos.h (mips_class_max_nregs, mips_register_move_cost):
New prototypes.

2002-04-24  Matt Hiller  <hiller@redhat.com>

* config/mips/mips.h (mips_sw_reg_names): Declare as extern.

(ALL_COP_ADDITIONAL_REGISTER_NAMES): New macro.
(FIRST_PSEUDO_REGISTER): Redefine considering coprocessor
registers, adjust comment accordingly.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS,
reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGISTER_NAMES,
DEBUG_REGISTER_NAMES, REG_ALLOC_ORDER): Adjust to include entries
for coprocessor registers.
(ADDITIONAL_REGISTER_NAMES): Include
ALL_COP_ADDITIONAL_REGISTER_NAMES.

(COP0_REG_FIRST, COP0_REG_LAST, COP0_REG_NUM,
COP2_REG_FIRST, COP2_REG_LAST, COP2_REG_NUM,
COP3_REG_FIRST, COP3_REG_LAST, COP3_REG_NUM,
COP0_REG_P, COP2_REG_P, COP3_REG_P, ALL_COP_REG_P,
COPNUM_AS_CHAR_FROM_REGNUM, COP_REG_CLASS_P): New macros.

(mips_char_to_class): Adjust comment to include coprocessor
constraint letters.

* config/mips/mips.c (coprocessor_operand, coprocessor2_operand):
New functions.
(mips_reg_names, mips_regno_to_class): Include coprocessor
information.
(mips_sw_reg_names): Ditto, make non-static.
(mips_move_1word): Handle moves to and from coprocessor registers.
(mips_move_2words): Handle moves to and from coprocessor
registers.
(mips_class_max_nregs, mips_register_move_cost): Handle
coprocessor register classes.
(override_options): Initialize mips_char_to_class and
mips_hard_regno_mode_ok properly for coprocessor registers.

* config/mips/mips.md (movdi_internal, movdi_internal2,
movsi_internal1, movsi_internal2): Add constraint-sets for
coprocessor registers.
* testsuite/gcc.c-torture/mipscop-1.c: New testcase.
* testsuite/gcc.c-torture/mipscop-1.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-2.c: New testcase.
* testsuite/gcc.c-torture/mipscop-2.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-3.c: New testcase.
* testsuite/gcc.c-torture/mipscop-3.x: Disable above if target
isn't mips.
* testsuite/gcc.c-torture/mipscop-4.c: New testcase.
* testsuite/gcc.c-torture/mipscop-4.x: Disable above if target
isn't mips.

* doc/tm.texi: Document feature.

From-SVN: r52765
14 files changed:
gcc/ChangeLog
gcc/config/mips/mips-protos.h
gcc/config/mips/mips.c
gcc/config/mips/mips.h
gcc/config/mips/mips.md
gcc/doc/tm.texi
gcc/testsuite/gcc.c-torture/compile/mipscop-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/mipscop-1.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/mipscop-2.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/mipscop-2.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/mipscop-3.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/mipscop-3.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/mipscop-4.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/mipscop-4.x [new file with mode: 0644]