4601d4e923
On Opteron/AMD64 systems with GCC, count_trailing_zeros in longlong.h may cause errors from the assembler about incorrect registers used with bsfq. Submitted by: edwin@mavetju.org Approved by: Alex Dupre <sysadmin@alexdupre.com> Obtained from: http://www.swox.com/gmp/#STATUS
15 lines
476 B
C
15 lines
476 B
C
--- longlong.h.old 2003-07-29 17:10:52.000000000 +1000
|
|
+++ longlong.h 2003-07-29 17:12:16.000000000 +1000
|
|
@@ -715,8 +715,10 @@
|
|
} while (0)
|
|
#define count_trailing_zeros(count, x) \
|
|
do { \
|
|
+ UDItype __cbtmp; \
|
|
ASSERT ((x) != 0); \
|
|
- __asm__ ("bsfq %1,%0" : "=r" (count) : "rm" ((UDItype)(x))); \
|
|
+ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
|
|
+ (count) = __cbtmp; \
|
|
} while (0)
|
|
#endif /* x86_64 */
|
|
|