[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: 2 Feb 2015 06:47:59 -0500
From: "George Spelvin" <linux@...izon.com>
To: linux@...musvillemoes.dk, yury.norov@...il.com
Cc: akpm@...ux-foundation.org, chris@...is-wilson.co.uk,
davem@...emloft.net, dborkman@...hat.com,
hannes@...essinduktion.org, klimov.linux@...il.com,
laijs@...fujitsu.com, linux-kernel@...r.kernel.org,
linux@...izon.com, msalter@...hat.com, takahiro.akashi@...aro.org,
tgraf@...g.ch, valentinrothberg@...il.com, y.norov@...sung.com
Subject: Re: [PATCH v2 1/3] lib: find_*_bit reimplementation
Rasmus Villemoes <linux@...musvillemoes.dk> wrote:
> ... and this be part of _find_next_bit? Can find_next_bit not be simply
> 'return _find_next_bit(addr, size, offset, 1);', and similarly for
> find_next_zero_bit? Btw., passing true and false for the boolean
> parameter may be a little clearer.
Looking at the generated code, it would be better to replace the boolean
parameter with 0ul or ~0ul and XOR with it. The same number of registers,
and saves a conditional branch.
(I was hoping GCC would figure that trick out, but it didn't.)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists