summaryrefslogtreecommitdiff
path: root/lib/ffsl.h
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* Put LGPLv2+ notices in source files where appropriate.Bruno Haible2021-06-041-7/+7
| | | | | * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* Use __builtin_ctz{,l,ll} and __builtin_ffs{,l,ll} with clang everywhere.Bruno Haible2020-08-051-2/+3
| | | | | | | * lib/count-trailing-zeros.h (COUNT_TRAILING_ZEROS): Use the GCC built-in also on clang. * lib/ffs.c: With clang, use the GCC built-in, not <intrin.h>. * lib/ffsl.h: Likewise. Assume GCC_BUILTIN is defined.
* ffsll: Optimize for MSVC in 64-bit mode.Bruno Haible2020-08-041-0/+8
| | | | | | * lib/ffsl.h (FUNC): On MSVC, use MSVC_BUILTIN if defined. * lib/ffsll.c (MSVC_BUILTIN): Define for MSVC in 64-bit mode. * lib/ffsl.c (MSVC_BUILTIN): Define for MSVC.
* ffsll: Optimize for MSVC in 32-bit mode.Bruno Haible2020-08-041-0/+16
| | | | | * lib/ffsl.h: Include <intrin.h>. (ffs): Define as inline function, like in lib/ffs.c.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* ffsl, ffsll: Avoid compilation error due to 'restrict'.Bruno Haible2011-10-311-0/+3
| | | | | * lib/ffsl.h: Include <config.h>. Suggested by Tom G. Christensen <tgc@jupiterrise.com>.
* ffsl: Optimize on 64-bit platforms.Bruno Haible2011-10-151-22/+19
| | | | | * lib/ffsl.h (FUNC): Omit a test from the last loop round. Do loop unrolling.
* ffsl: Optimize on 32-bit platforms.Bruno Haible2011-10-141-11/+27
| | | | | * lib/ffsl.h (FUNC): If TYPE has the same representation as 'int', just use ffs() without a loop.
* ffsl, ffsll: Optimize for GCC.Bruno Haible2011-10-141-0/+4
| | | | | | * lib/ffsl.h (FUNC): Use GCC_BUILTIN if defined. * lib/ffsl.c (GCC_BUILTIN): New macro. * lib/ffsll.c (GCC_BUILTIN): Likewise.
* ffsl, ffsll: Avoid unportable behaviour.Bruno Haible2011-07-161-4/+4
| | | | * lib/ffsl.h (FUNC): Use 'unsigned int' instead of 'int'.
* ffsl, ffsll: new modulesEric Blake2011-07-151-0/+47
* modules/ffsl: New file. * modules/ffsll: Likewise. * m4/ffsl.m4: Likewise. * m4/ffsll.m4: Likewise. * lib/ffsl.c: Likewise. * lib/ffsl.h: Likewise. * lib/ffsll.c: Likewise. * m4/string_h.m4 (gl_HEADER_STRING_H_BODY) (gl_HEADER_STRING_H_DEFAULTS): Add defaults. * modules/string (Makefile.am): Substitute witnesses. * lib/strings.in.h (ffsl, ffsll): Declare. * modules/ffsl-tests: New test file. * modules/ffsll-tests: Likewise. * tests/test-ffsl.c: Likewise. * tests/test-ffsll.c: Likewise. * MODULES.html.sh (Integer arithmetic functions): Mention it. * doc/glibc-functions/ffsl.texi (ffsl): Likewise. * doc/glibc-functions/ffsll.texi (ffsll): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>