Back to index

glibc  2.9
Defines | Functions
ffsll.c File Reference
#include <string.h>

Go to the source code of this file.


#define ffsl   __something_else


int ffsll (long long int x)

Define Documentation

#define ffsl   __something_else

Definition at line 22 of file ffsll.c.

Function Documentation

int ffsll ( long long int  x)

Definition at line 28 of file ffsll.c.

  long long int cnt;
  long long int tmp;

  asm ("bsfq %2,%0\n"              /* Count low bits in X and store in %1.  */
       "cmoveq %1,%0\n"            /* If number was zero, use -1 as result.  */
       : "=&r" (cnt), "=r" (tmp) : "rm" (x), "1" (-1));

  return cnt + 1;