aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-10-05 22:32:59 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-10-05 22:32:59 -0700
commit29279975b86791aeb42b8d3e6bc8c001c7bb030b (patch)
tree042703dd3c9dafb35f6e957d0a09b09bb429bcb7
parentd6eacd48360d5a1e8d5ca6ef7a1826f72c05ceb2 (diff)
downloadgcc-29279975b86791aeb42b8d3e6bc8c001c7bb030b.zip
gcc-29279975b86791aeb42b8d3e6bc8c001c7bb030b.tar.gz
gcc-29279975b86791aeb42b8d3e6bc8c001c7bb030b.tar.bz2
longlong.h [alpha] (count_leading_zeros): Use cmpbge with a zero instead of -1.
* longlong.h [alpha] (count_leading_zeros): Use cmpbge with a zero instead of -1. (count_trailing_zeros): Likewise. From-SVN: r36745
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/longlong.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 111b37d..c1bb180 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -5,6 +5,10 @@
(__clz_tab): Put in its own unit, non-static.
* libgcc2.h: Always include longlong.h.
+ * longlong.h [alpha] (count_leading_zeros): Use cmpbge with
+ a zero instead of -1.
+ (count_trailing_zeros): Likewise.
+
2000-10-05 Richard Henderson <rth@cygnus.com>
* config/alpha/alpha.c (alpha_emit_setcc): Don't swap GT tests
diff --git a/gcc/longlong.h b/gcc/longlong.h
index 25b952c..bcd4abc 100644
--- a/gcc/longlong.h
+++ b/gcc/longlong.h
@@ -180,7 +180,7 @@ extern const UQItype __clz_tab[];
#define count_leading_zeros(COUNT,X) \
do { \
UDItype __xr = (X), __t, __a; \
- __asm__("cmpbge %1,%2,%0" : "=r"(__t) : "r"(~__xr), "r"(-1)); \
+ __asm__("cmpbge $31,%1,%0" : "=r"(__t) : "r"(__xr)); \
__a = __clz_tab[__t ^ 0xff] - 1; \
__asm__("extbl %1,%2,%0" : "=r"(__t) : "r"(__xr), "r"(__a)); \
(COUNT) = 64 - (__clz_tab[__t] + __a*8); \
@@ -188,7 +188,7 @@ extern const UQItype __clz_tab[];
#define count_trailing_zeros(COUNT,X) \
do { \
UDItype __xr = (X), __t, __a; \
- __asm__("cmpbge %1,%2,%0" : "=r"(__t) : "r"(~__xr), "r"(-1)); \
+ __asm__("cmpbge $31,%1,%0" : "=r"(__t) : "r"(__xr)); \
__t = ~__t & -~__t; \
__a = ((__t & 0xCC) != 0) * 2; \
__a += ((__t & 0xF0) != 0) * 4; \