Borislav Petkov d61931d89b x86: Add optimized popcnt variants
Add support for the hardware version of the Hamming weight function,
popcnt, present in CPUs which advertize it under CPUID, Function
0x0000_0001_ECX[23]. On CPUs which don't support it, we fallback to the
default lib/hweight.c sw versions.

A synthetic benchmark comparing popcnt with __sw_hweight64 showed almost
a 3x speedup on a F10h machine.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <20100318112015.GC11152@aftab>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-04-06 15:52:11 -07:00
..
2005-10-18 08:26:15 -07:00
2007-05-11 05:38:25 -04:00
2008-07-24 10:47:33 -07:00
2010-03-06 11:26:35 -08:00
2008-06-06 11:29:10 -07:00
2009-11-20 20:13:39 +01:00
2007-07-16 09:05:50 -07:00
2009-11-03 16:06:53 +01:00
2007-07-17 10:23:04 -07:00
2006-06-25 10:01:20 -07:00
2005-04-16 15:20:36 -07:00
2006-06-25 10:01:20 -07:00
2007-05-10 18:24:13 +02:00
2005-04-16 15:20:36 -07:00
2009-01-01 10:12:19 +10:30
2008-04-29 08:11:16 -07:00
2009-06-18 13:04:05 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2009-06-16 19:47:51 -07:00
2010-04-06 15:52:11 -07:00
2006-06-20 20:24:58 -07:00
2008-07-26 12:00:07 -07:00
2006-10-06 08:53:40 -07:00
2009-12-14 23:55:33 +01:00
2010-02-03 17:39:50 +11:00
2009-10-01 21:17:49 +02:00
2010-04-06 15:52:11 -07:00
2009-12-15 08:53:33 -08:00
2005-04-16 15:20:36 -07:00
2008-07-30 16:29:19 -07:00
2010-01-11 09:34:05 -08:00
2008-01-30 13:33:00 +01:00
2010-03-06 11:26:35 -08:00
2008-07-26 12:00:10 -07:00
2010-03-14 20:08:36 -04:00