[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/10] bitops: Remove routines redundant with host-u
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 10/10] bitops: Remove routines redundant with host-utils |
Date: |
Wed, 13 Feb 2013 17:47:43 -0800 |
Signed-off-by: Richard Henderson <address@hidden>
---
include/qemu/bitops.h | 48 ------------------------------------------------
1 file changed, 48 deletions(-)
diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h
index b50629b..affcc96 100644
--- a/include/qemu/bitops.h
+++ b/include/qemu/bitops.h
@@ -24,54 +24,6 @@
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
/**
- * bitops_ctzl - count trailing zeroes in word.
- * @word: The word to search
- *
- * Returns -1 if no bit exists. Note that compared to the C library
- * routine ffsl, this one returns one less.
- */
-static unsigned long bitops_ctzl(unsigned long word)
-{
-#if QEMU_GNUC_PREREQ(3, 4)
- return __builtin_ffsl(word) - 1;
-#else
- if (!word) {
- return -1;
- }
-
- if (sizeof(long) == 4) {
- return ctz32(word);
- } else if (sizeof(long) == 8) {
- return ctz64(word);
- } else {
- abort();
- }
-#endif
-}
-
-/**
- * bitops_fls - find last (most-significant) set bit in a long word
- * @word: the word to search
- *
- * Undefined if no set bit exists, so code should check against 0 first.
- */
-static inline unsigned long bitops_flsl(unsigned long word)
-{
- return BITS_PER_LONG - 1 - clzl(word);
-}
-
-/**
- * cto - count trailing ones in word.
- * @word: The word to search
- *
- * Returns -1 if all bit are set.
- */
-static inline unsigned long bitops_ctol(unsigned long word)
-{
- return bitops_ctzl(~word);
-}
-
-/**
* set_bit - Set a bit in memory
* @nr: the bit to set
* @addr: the address to start counting from
--
1.8.1.2
- [Qemu-devel] [PATCH v2 00/10] Cleanup bitops vs host-utils, Richard Henderson, 2013/02/13
- [Qemu-devel] [PATCH 01/10] host-utils: Add host long specific aliases for clz, ctz, ctpop, Richard Henderson, 2013/02/13
- [Qemu-devel] [PATCH 02/10] host-utils: Fix coding style and add comments, Richard Henderson, 2013/02/13
- [Qemu-devel] [PATCH 03/10] hbitmap: Use non-bitops ctzl, Richard Henderson, 2013/02/13
- [Qemu-devel] [PATCH 04/10] bitops: Use non-bitops ctzl, Richard Henderson, 2013/02/13
- [Qemu-devel] [PATCH 05/10] memory: Use non-bitops ctzl, Richard Henderson, 2013/02/13
- [Qemu-devel] [PATCH 06/10] bitops: Write bitops_flsl in terms of clzl, Richard Henderson, 2013/02/13
- [Qemu-devel] [PATCH 07/10] target-i386: Inline bitops_flsl, Richard Henderson, 2013/02/13
- [Qemu-devel] [PATCH 08/10] bitops: Inline bitops_flsl, Richard Henderson, 2013/02/13
- [Qemu-devel] [PATCH 10/10] bitops: Remove routines redundant with host-utils,
Richard Henderson <=
- [Qemu-devel] [PATCH 09/10] bitops: Replace bitops_ctol with ctzl, Richard Henderson, 2013/02/13
- Re: [Qemu-devel] [PATCH v2 00/10] Cleanup bitops vs host-utils, Peter Maydell, 2013/02/14
- Re: [Qemu-devel] [PATCH v2 00/10] Cleanup bitops vs host-utils, Eric Blake, 2013/02/14
- Re: [Qemu-devel] [PATCH v2 00/10] Cleanup bitops vs host-utils, Blue Swirl, 2013/02/16