aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2003-02-08 03:59:40 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2003-02-07 22:59:40 -0500
commit949939097efb6c39e6746dd10f77f959c23da70b (patch)
tree231101e6f2a040d631f8122c909ac49f8149cbbc /gcc
parentd865b1226d3edfe48b70f79e3910dc90a9429ad8 (diff)
downloadgcc-949939097efb6c39e6746dd10f77f959c23da70b.zip
gcc-949939097efb6c39e6746dd10f77f959c23da70b.tar.gz
gcc-949939097efb6c39e6746dd10f77f959c23da70b.tar.bz2
- Add ctz patterns.
From-SVN: r62572
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/config/rs6000/rs6000.h5
-rw-r--r--gcc/config/rs6000/rs6000.md1
3 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 92e0d2b..0c5d5ae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -2,8 +2,10 @@
* config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
* config/rs6000/rs6000.md (clzsi2): Rename from cntlzw2.
+ (ctzsi2): New pattern.
(ffssi2): Use clz instead of unspec.
(clzdi2): Rename from cntlzd2.
+ (ctzdi2): New pattern.
(ffsdi2): Use clz instead of unspec.
2003-02-07 Loren James Rittle <ljrittle@acm.org>
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 31c88a0..1381ca4 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -2270,10 +2270,13 @@ do { \
is done just by pretending it is already truncated. */
#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
-/* The cntlzw and cntlzd instructions return 32 and 64 for zero. */
+/* 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))
+/* The CTZ patterns return -1 for input of zero. */
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = -1)
+
/* Specify the machine mode that pointers have.
After generation of rtl, the compiler makes no further distinction
between pointers and any other objects of this machine mode. */
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index e4a17cf..142159d 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -36,7 +36,6 @@
;; 16 macho_correct_pic
;; 19 movesi_from_cr
;; 20 movesi_to_cr
-;; 21 cntlz{w,d}2 count lead zero word/double word
;; Define an insn type attribute. This is used in function unit delay
;; computations.