summaryrefslogtreecommitdiff
path: root/gcc/longlong.h
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-06 05:32:59 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-06 05:32:59 +0000
commitd0b85c45f700e6b6e97608db91b7f071a8acea17 (patch)
tree042703dd3c9dafb35f6e957d0a09b09bb429bcb7 /gcc/longlong.h
parent9ce1b52b3654f3d39a5560b8c2fc5864d556a54d (diff)
downloadgcc-d0b85c45f700e6b6e97608db91b7f071a8acea17.tar.gz
* longlong.h [alpha] (count_leading_zeros): Use cmpbge with
a zero instead of -1. (count_trailing_zeros): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36745 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/longlong.h')
-rw-r--r--gcc/longlong.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/longlong.h b/gcc/longlong.h
index 25b952c081c..bcd4abc843e 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; \