Opteron: Error: suffix or operands invalid for `bsf'

Kevin Ryde user42@zip.com.au
Thu, 31 Jul 2003 09:37:58 +1000


Torbjorn pointed out that q in the gcc operand output will force it to
give the DImode register form.  Could someone give this a try please:

--- 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 {									\
     ASSERT ((x) != 0);							\
-    __asm__ ("bsfq %1,%0" : "=r" (count) : "rm" ((UDItype)(x)));	\
+    __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x)));	\
   } while (0)
 #endif /* x86_64 */