aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@greed.local>2003-12-30 20:27:53 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2003-12-30 20:27:53 +0000
commit222a2f1afb8130c98cbf42edb982e87f221fe4ff (patch)
tree910d863649df21fad7a3b3035c97ecc3b25d907b /gcc
parentcca9b4b54d86897efe9f691274a2a9fbd0c15b5e (diff)
downloadgcc-222a2f1afb8130c98cbf42edb982e87f221fe4ff.zip
gcc-222a2f1afb8130c98cbf42edb982e87f221fe4ff.tar.gz
gcc-222a2f1afb8130c98cbf42edb982e87f221fe4ff.tar.bz2
tm.texi (PREFERRED_RELOAD_CLASS): Describe use of NO_REGS with constants.
* doc/tm.texi (PREFERRED_RELOAD_CLASS): Describe use of NO_REGS with constants. From-SVN: r75245
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/tm.texi15
2 files changed, 16 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b84f4cf..4272091 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-30 Geoffrey Keating <geoffk@greed.local>
+
+ * doc/tm.texi (PREFERRED_RELOAD_CLASS): Describe use of NO_REGS
+ with constants.
+
2003-12-30 Mark Mitchell <mark@codesourcery.com>
* stor-layout.c (layout_decl): Turn bitfields into ordinary
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 6b8ad5e..fa0e189 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -2419,10 +2419,17 @@ for a @samp{moveq} instruction, the value of this macro is always
@code{DATA_REGS} as long as @var{class} includes the data registers.
Requiring a data register guarantees that a @samp{moveq} will be used.
-If @var{x} is a @code{const_double}, by returning @code{NO_REGS}
-you can force @var{x} into a memory constant. This is useful on
-certain machines where immediate floating values cannot be loaded into
-certain kinds of registers.
+One case where @code{PREFERRED_RELOAD_CLASS} must not return
+@var{class} is if @var{x} is a legitimate constant which cannot be
+loaded into some register class. By returning @code{NO_REGS} you can
+force @var{x} into a memory location. For example, rs6000 can load
+immediate values into general-purpose registers, but does not have an
+instruction for loading an immediate value into a floating-point
+register, so @code{PREFERRED_RELOAD_CLASS} returns @code{NO_REGS} when
+@var{x} is a floating-point constant. If the constant can't be loaded
+into any kind of register, code generation will be better if
+@code{LEGITIMATE_CONSTANT_P} makes the constant illegitimate instead
+of using @code{PREFERRED_RELOAD_CLASS}.
@end defmac
@defmac PREFERRED_OUTPUT_RELOAD_CLASS (@var{x}, @var{class})