On Thu, Apr 07, 2016 at 08:31:09AM +0200, Dmitry Vyukov wrote: > Hweight custom calling convention caused crashes with KCOV coverage. > We had to disable instrumentation of the file.
I guess we can do something like this: if (likely(static_cpu_has(X86_FEATURE_POPCNT))) asm volatile(POPCNT32 : "="REG_OUT (res) : REG_IN (w)); else res = __sw_hweight32(w); and get rid of the custom calling convention. Along with some numbers showing that the change doesn't cause any noticeable slowdown... -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --