diff options
author | sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-09 14:08:54 +0000 |
---|---|---|
committer | sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-09 14:08:54 +0000 |
commit | e533b20e5dabbb15601e49736e9e9ca917dcb44e (patch) | |
tree | a8a3fee4ca17eda473bf8fd976e6e1976cb54255 /gcc/doc/tm.texi | |
parent | 99bdde56c01a90080290f126b54b20e6c1cf0ea0 (diff) | |
download | gcc-e533b20e5dabbb15601e49736e9e9ca917dcb44e.tar.gz |
2007-08-09 Sandra Loosemore <sandra@codesourcery.com>
Nigel Stephens <nigel@mips.com>
gcc/
* doc/tm.texi (CLZ_DEFINED_VALUE_AT_ZERO, CTZ_DEFINED_VALUE_AT_ZERO):
Document change in interpretation of value from boolean to
tri-state integer.
* optabs.c (expand_ffs, expand_ctz): New functions to compute
ffs and ctz using clz.
(expand_unop): Call them.
* config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Fix its
result value.
(CTZ_DEFINED_VALUE_AT_ZERO): Likewise.
* config/mips/mips.h (CLZ_DEFINED_VALUE_AT_ZERO): Likewise, to
enable the new ffs expansion on this target.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127318 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r-- | gcc/doc/tm.texi | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index bf6859d2c39..1b690a1cb72 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -9638,14 +9638,23 @@ given mode. @defmac CLZ_DEFINED_VALUE_AT_ZERO (@var{mode}, @var{value}) @defmacx CTZ_DEFINED_VALUE_AT_ZERO (@var{mode}, @var{value}) -A C expression that evaluates to true if the architecture defines a value -for @code{clz} or @code{ctz} with a zero operand. If so, @var{value} -should be set to this value. If this macro is not defined, the value of -@code{clz} or @code{ctz} is assumed to be undefined. +A C expression that indicates whether the architecture defines a value +for @code{clz} or @code{ctz} with a zero operand. +A result of @code{0} indicates the value is undefined. +If the value is defined for only the RTL expression, the macro should +evaluate to @code{1}; if the value applies also to the corresponding optab +entry (which is normally the case if it expands directly into +the corresponding RTL), then the macro should evaluate to @code{2}. +In the cases where the value is defined, @var{value} should be set to +this value. + +If this macro is not defined, the value of @code{clz} or +@code{ctz} at zero is assumed to be undefined. This macro must be defined if the target's expansion for @code{ffs} relies on a particular value to get correct results. Otherwise it -is not necessary, though it may be used to optimize some corner cases. +is not necessary, though it may be used to optimize some corner cases, and +to provide a default expansion for the @code{ffs} optab. Note that regardless of this macro the ``definedness'' of @code{clz} and @code{ctz} at zero do @emph{not} extend to the builtin functions |