Re: [PATCH -v2] x86/hweight: Get rid of the special calling convention
From: Borislav Petkov
Date: Thu May 12 2016 - 09:09:50 EST
On Thu, May 12, 2016 at 02:14:52PM +0200, Peter Zijlstra wrote:
> But this is a C function, with C calling convention. You're now assuming
> GCC doesn't clobber anything with its prologue/epilogue.
>
> I think hpa meant to put it in an .S file and avoid all that.
I wanted to have gcc use %[w] and this way not hardcode the reg but the
ABI kinda hardcodes it to rAX. And you're right about tracing funkyness
adding glue so we're probably better off doing the .S thing directly and
making it more robust this way.
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix ImendÃrffer, Jane Smithard, Graham Norton, HRB 21284 (AG NÃrnberg)
--