Commit Graph

3 Commits

Author SHA1 Message Date
Erik Faye-Lund 2f82d972ab util: only allow _BitScanReverse64 on 64-bit cpus
While the documentation for _BitScanReverse64 on MSDN says that it's
available on ARM, this isn't true. It's only available on ARM64. So
let's match reality.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Matt Turner <mattst88@gmail.com>
2019-09-02 12:45:45 +00:00
Emil Velikov a72ac98160 util/bitscan: use correct signature for ffs/ffsll
Otherwise we'll get errors such as

error: conflicting types for ‘ffs’
error: conflicting types for ‘ffsll’

We might want to improve the heuristics and provide a definition only
when a native one is missing. We can address that at a later stage.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-03-13 11:16:34 +00:00
Mathias Fröhlich c3b6656676 mesa/gallium: Move u_bit_scan{,64} from gallium to util.
The functions are also useful for mesa.
Introduce src/util/bitscan.{h,c}. Move ffs function
implementations from src/mesa/main/imports.{h,c}.
Move bit scan related functions from
src/gallium/auxiliary/util/u_math.h. Merge platform
handling with what is available from within mesa.

v2: Try to fix MSVC compile.

Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-06-14 05:19:10 +02:00