[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in gmp on Opteron
From: |
Greg Lindahl |
Subject: |
Re: bug in gmp on Opteron |
Date: |
Thu, 18 Dec 2003 17:46:21 -0800 |
User-agent: |
Mutt/1.2.5.1i |
On second thought, it's not clear to me that this patch works. The gmp
source is somewhat confusingly arranged, and I think I ended up
testing the system library instead of the one I just made, and the one
I just made flunks the count_zeros testing.
> This patch works around it:
>
> --- longlong.h~ 2002-12-17 13:57:20.000000000 -0800
> +++ longlong.h 2003-12-18 16:29:52.575408366 -0800
> @@ -715,8 +715,10 @@
> } while (0)
> #define count_trailing_zeros(count, x) \
> do { \
> + long __bug_temp; \
> ASSERT ((x) != 0); \
> - __asm__ ("bsfq %1,%0" : "=r" (count) : "rm" ((UDItype)(x))); \
> + __asm__ ("bsfq %1,%0" : "=r" (__bug_temp) : "rm" ((UDItype)(x))); \
> + count = __bug_temp; \
> } while (0)
> #endif /* x86_64 */