Messages in this thread |  | | | Date | Thu, 18 Feb 2010 12:51:55 +0100 | | From | Borislav Petkov <> | | Subject | Re: [PATCH 2/5] bitops: compile time optimization for hweight_long(CONSTANT) |
| |
On Thu, Feb 18, 2010 at 11:51:50AM +0100, Peter Zijlstra wrote: > I guess one way to achieve that is to create a arch/x86/lib/hweight.c > that includes lib/hweight.c and give the x86 one special compile flags > and not build the lib on.
That's what I thought initially too but that won't fly because the lib/hweight.c helpers have to be inlined into arch/x86/lib/hweight.c so that gcc can take care of the clobbered registers. Otherwise, it just a "call __sw_hweightXX" that gets issued into asm.
-- Regards/Gruss, Boris.
- Advanced Micro Devices, Inc. Operating Systems Research Center
|  |