From 6049a4c8fb26a12b6195169e1a7ec3fb2ff860d4 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Thu, 9 Jun 2011 23:32:32 +0000 Subject: [PATCH] tm.texi.in (Register Classes): Document rule for the narrowest register classes. * doc/tm.texi.in (Register Classes): Document rule for the narrowest register classes. * doc/tm.texi: Regenerate. From-SVN: r174866 --- gcc/ChangeLog | 6 ++++++ gcc/doc/tm.texi | 6 ++++++ gcc/doc/tm.texi.in | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b56edc17b6..b9340f26572 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-06-10 Hans-Peter Nilsson + + * doc/tm.texi.in (Register Classes): Document rule for the narrowest + register classes. + * doc/tm.texi: Regenerate. + 2011-06-09 Kaz Kojima PR target/49307 diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index ebc876f1456..b32ff89bc8e 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -2337,6 +2337,12 @@ constraints is through machine-dependent operand constraint letters. You can define such letters to correspond to various classes, then use them in operand constraints. +You must define the narrowest register classes for allocatable +registers, so that each class either has no subclasses, or that for +some mode, the move cost between registers within the class is +cheaper than moving a register in the class to or from memory +(@pxref{Costs}). + You should define a class for the union of two classes whenever some instruction allows both classes. For example, if an instruction allows either a floating point (coprocessor) register or a general register for a diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 85fcfb1cdb8..667b1ef24bb 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -2327,6 +2327,12 @@ constraints is through machine-dependent operand constraint letters. You can define such letters to correspond to various classes, then use them in operand constraints. +You must define the narrowest register classes for allocatable +registers, so that each class either has no subclasses, or that for +some mode, the move cost between registers within the class is +cheaper than moving a register in the class to or from memory +(@pxref{Costs}). + You should define a class for the union of two classes whenever some instruction allows both classes. For example, if an instruction allows either a floating point (coprocessor) register or a general register for a -- 2.30.2