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

From: Borislav Petkov
Date: Wed May 11 2016 - 00:11:36 EST


On Tue, May 10, 2016 at 03:30:48PM -0700, H. Peter Anvin wrote:
> I didn't mean inline assembly.

How does that matter?

The problem is having as less insn bytes as possible and the minimal
size we can do is issuing POPCNT everywhere which is 4 or 5 bytes. The
alternatives then replace that with a CALL which is also 5 bytes.

The way I did it now, it adds 22K more to allyesconfig vmlinux due to
the static_cpu_has doubled alternatives sections and the JMPs. The
thunks will keep those 5 bytes *and* get rid of the calling convention
without the growth.

Or?

--
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix ImendÃrffer, Jane Smithard, Graham Norton, HRB 21284 (AG NÃrnberg)
--