summaryrefslogtreecommitdiff
path: root/devel/gmp/patches/patch-aa
blob: 348cd48ba88b66c765a0e6d96ace00ffc1404058 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-aa,v 1.13 2014/04/17 13:08:24 wiz Exp $

--- longlong.h.orig	2014-03-25 14:37:55.000000000 +0000
+++ longlong.h
@@ -1039,8 +1039,10 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype 
    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 /* __amd64__ */