summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2016-08-02 08:46:04 +0200
committerMathias Fröhlich <[email protected]>2016-08-09 21:20:46 +0200
commit027cbf00f248bda325521db8f56a3718898da46b (patch)
tree5e5cce2c268223053e4504f921c5143277f51b3c /src/mesa/main
parente4cb3af524cb02ec7cd23a64da033cfb7193a3cb (diff)
util: Move _mesa_fsl/util_last_bit into util/bitscan.h
As requested with the initial creation of util/bitscan.h now move other bitscan related functions into util. v2: Split into two patches. Signed-off-by: Mathias Fröhlich <[email protected]> Tested-by: Brian Paul <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/imports.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 05cc5cad593..21bcb10c006 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -339,51 +339,6 @@ extern unsigned int
_mesa_bitcount_64(uint64_t n);
#endif
-/**
- * Find the last (most significant) bit set in a word.
- *
- * Essentially ffs() in the reverse direction.
- */
-static inline unsigned int
-_mesa_fls(unsigned int n)
-{
-#ifdef HAVE___BUILTIN_CLZ
- return n == 0 ? 0 : 32 - __builtin_clz(n);
-#else
- unsigned int v = 1;
-
- if (n == 0)
- return 0;
-
- while (n >>= 1)
- v++;
-
- return v;
-#endif
-}
-
-/**
- * Find the last (most significant) bit set in a uint64_t value.
- *
- * Essentially ffsll() in the reverse direction.
- */
-static inline unsigned int
-_mesa_flsll(uint64_t n)
-{
-#ifdef HAVE___BUILTIN_CLZLL
- return n == 0 ? 0 : 64 - __builtin_clzll(n);
-#else
- unsigned int v = 1;
-
- if (n == 0)
- return 0;
-
- while (n >>= 1)
- v++;
-
- return v;
-#endif
-}
static inline bool
_mesa_half_is_negative(GLhalfARB h)