On Wed, 2004-05-12 at 13:58, Yuri Per wrote:
> This is in fact bug in x86-64 ffs() implementation:
>
> static __inline__ int ffs(int x)
> {
> int r;
>
> __asm__("bsfl %1,%0\n\t"
> "cmovzl %2,%0"
> : "=r" (r) : "g" (x), "r" (-1));
> return r+1;
> }
>
> "g" should be replaced with "rm".
Ah yes, indeed. Well spotted!
I will forward this to LKML.
Best regards,
Anton
>
>
> Yuri
>
> Anton Altaparmakov wrote:
>
> >On Wed, 2004-05-12 at 12:56, and...@in... wrote:
> >
> >
> >>>On Wed, 2004-05-12 at 11:14, and...@in... wrote:
> >>>
> >>>
> >>>>Hi, I have found a problem compiling te source of kernel 2.6.6, if I
> >>>>enable NTFS write support when i run "make" i get this error:
> >>>>
> >>>>....
> >>>> CC fs/ntfs/inode.o
> >>>> CC fs/ntfs/logfile.o
> >>>>{standard input}: Assembler messages:
> >>>>{standard input}:683: Error: suffix or operands invalid for `bsf'
> >>>>make[2]: *** [fs/ntfs/logfile.o] Error 1
> >>>>make[1]: *** [fs/ntfs] Error 2
> >>>>make: *** [fs] Error 2
> >>>>
> >>>>my kernel version is:
> >>>>Linux version 2.6.5-AS1500 (root@ntb-gozzolox) (gcc version 3.3.2
> >>>>20031022
> >>>>(Red Hat Linux 3.3.2-1)) #3 Thu Apr 15 10:13:11 CEST 2004
> >>>>
> >>>>
> >>The binutils ver is:
> >>binutils-2.14.90.0.6-4
> >>
> >>
> >
> >This happens because gcc (wrongly!) optimizes a variable into a constant
> >and then ffs() fails to assemble because the bsfl instruction is only
> >allowed with memory operands and not constants.
> >
> >/me hates gcc...
> >
> >Please try the below fix. It uses generic_ffs() which is ffs() the slow
> >way so it should build fine.
> >
> >Thanks a lot for your help.
> >
> >Best regards,
> >
> > Anton
> >
> >
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Sleepycat Software
> Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to
> deliver higher performing products faster, at low TCO.
> http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
> _______________________________________________
> Linux-NTFS-Dev mailing list
> Lin...@li...
> https://lists.sourceforge.net/lists/listinfo/linux-ntfs-dev
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ &
http://www-stu.christs.cam.ac.uk/~aia21/
|