summaryrefslogtreecommitdiff
path: root/devel/gmp/patches/patch-aa
blob: c8240026b6685a18f740db013e4acc9f674ab82c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-aa,v 1.11 2006/12/09 03:38:16 jnemeth Exp $

--- longlong.h.orig	2006-12-08 17:56:28.000000000 -0800
+++ longlong.h
@@ -826,8 +826,10 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
    count is only an int. */
 #define count_trailing_zeros(count, x)					\
   do {									\
+    UDItype __cbtmp;							\
     ASSERT ((x) != 0);							\
-    __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x)));	\
+    __asm__ ("bsfq %1,%q0" : "=r" (__cbtmp) : "rm" ((UDItype)(x)));	\
+    (count) = __cbtmp;							\
   } while (0)
 #endif /* x86_64 */