summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000
diff options
context:
space:
mode:
authorsandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-09 14:08:54 +0000
committersandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-09 14:08:54 +0000
commite533b20e5dabbb15601e49736e9e9ca917dcb44e (patch)
treea8a3fee4ca17eda473bf8fd976e6e1976cb54255 /gcc/config/rs6000
parent99bdde56c01a90080290f126b54b20e6c1cf0ea0 (diff)
downloadgcc-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/config/rs6000')
-rw-r--r--gcc/config/rs6000/rs6000.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index fae5ea2b578..5f34c800fb6 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1856,10 +1856,10 @@ do { \
/* The cntlzw and cntlzd instructions return 32 and 64 for input of zero. */
#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
- ((VALUE) = ((MODE) == SImode ? 32 : 64))
+ ((VALUE) = ((MODE) == SImode ? 32 : 64), 1)
/* The CTZ patterns return -1 for input of zero. */
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = -1)
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = -1, 1)
/* Specify the machine mode that pointers have.
After generation of rtl, the compiler makes no further distinction