lkml.org 
[lkml]   [2016]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 10/30] Add x86-specific parity functions
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)
--

\
 
 \ /
  Last update: 2016-04-07 12:01    [W:0.101 / U:0.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site