[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.01.1208101451280.23731@frira.zrqbmnf.qr>
Date: Fri, 10 Aug 2012 14:51:49 +0200 (CEST)
From: Jan Engelhardt <jengelh@...i.de>
To: David Miller <davem@...emloft.net>
cc: dhowells@...hat.com, arnd@...db.de,
linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, dmitry.kasatkin@...el.com
Subject: Re: [PATCH] MPILIB: Provide count_leading/trailing_zeros() based on
arch functions
On Saturday 2012-07-21 02:46, David Miller wrote:
>> Arnd Bergmann <arnd@...db.de> wrote:
>>
>>> I don't generally like to put stuff into asm-generic when it's unlikely
>>> to be overridden by architectures. It would really belong into
>>> include/linux, but then again we have all the other bitops in asm-generic
>>> as well, so whatever...
>>
>> Some arches (such as Sparc, I think) have count-leading-zero instructions.
>
>Yes, newer sparc64 chips have leading-zero-detect, and I was pretty
>sure that powerpc had something similar. It's called count-leading-
>zeros or something like that.
And gcc has a __builtin_clz.
--
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