On 29-Nov-01 Peter Pentchev wrote: > On Wed, Nov 21, 2001 at 11:38:35AM -0800, John Baldwin wrote: >> >> On 21-Nov-01 David Xu wrote: >> > 4.4-stable, file sys/i386/include/cpufunc.h, >> > >> > --- cpufunc.h.orig Wed Nov 21 13:35:36 2001 >> > +++ cpufunc.h Wed Nov 21 15:00:12 2001 >> > @@ -72,7 +72,7 @@ >> > { >> > u_int result; >> > >> > - __asm __volatile("bsfl %0,%0" : "=r" (result) : "0" (mask)); >> > + __asm __volatile("bsfl %0,%0" : "=r" (result) : "0" (mask) : >> > "cc"); >> > return (result); >> > } >> > >> > @@ -81,7 +81,7 @@ >> > { >> > u_int result; >> > >> > - __asm __volatile("bsrl %0,%0" : "=r" (result) : "0" (mask)); >> > + __asm __volatile("bsrl %0,%0" : "=r" (result) : "0" (mask) : >> > "cc"); >> > return (result); >> > } >> > >> > @@ -305,7 +305,7 @@ >> > u_int result; >> > >> > __asm __volatile("xorl %0,%0; xchgl %1,%0" >> > - : "=&r" (result) : "m" (*addr)); >> > + : "=&r" (result) : "m" (*addr) : "cc"); >> > return (result); >> > } >> > >> >> Have you had actual bugs as a result of "cc" not being in the constraints? >> >> If so, there's a _lot_ more places that need this. All the atomic ops, for >> example. > > How about PR gnu/32365? I know next to nothing about assembler opcodes, > if "cc" would fix the PR, then the PR is a demonstration of an actual bug. > > G'luck, > Peter
That PR is a bug in the actual compiler itself. I do have a rather largish patch of asm constraint fixes all across the sys/i386 tree in the kernel at www.freebsd.org/~jhb/patches/i386_asm.patch that includes these patches among other things. -- John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message