Re: [PATCH -v2] x86/hweight: Get rid of the special calling convention

From: Peter Zijlstra
Date: Wed May 11 2016 - 07:24:34 EST


On Wed, May 11, 2016 at 07:15:19AM -0400, Brian Gerst wrote:

> I think he meant the out of line version would be asm, so you could
> control what registers were clobbered.

Yeah, it might save a few cycles on the call, but given that most
machines should have popcnt these days is it worth the hassle/cost of
duplicating the lib/hweight.c magic in asm (and remember, twice, once
for 32bit and once for 64bit) ?