From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH] x86: Add optimized popcnt variants Date: Tue, 23 Feb 2010 18:54:57 +0100 Message-ID: <20100223175457.GA2401@aftab> References: <20100219142205.GA32533@aftab> <4B7EB6EF.9010405@zytor.com> <20100219164512.GA492@aftab> <4B7EC20C.30607@zytor.com> <20100222141737.GB21233@aftab> <4B82BD01.3030008@zytor.com> <20100222184945.GD21233@aftab> <4B82E144.1050007@zytor.com> <20100223155852.GF30382@aftab> <4B84118C.90203@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Borislav Petkov , Michal Marek , linux-kbuild , Peter Zijlstra , Andrew Morton , Wu Fengguang , LKML , Jamie Lokier , Roland Dreier , Al Viro , "linux-fsdevel@vger.kernel.org" , Ingo Molnar , Brian Gerst To: "H. Peter Anvin" Return-path: Content-Disposition: inline In-Reply-To: <4B84118C.90203@zytor.com> Sender: linux-kbuild-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org =46rom: "H. Peter Anvin" Date: Tue, Feb 23, 2010 at 09:34:04AM -0800 > On 02/23/2010 07:58 AM, Borislav Petkov wrote: > > > >Hmm, we cannot do that with the current design since __arch_hweight6= 4 > >is being inlined into every callsite and AFAICT we would have to bui= ld > >every callsite with "-fcall-saved-rdi" which is clearly too much. Th= e > >explicit "=3DD" dummy constraint is straightforward, instead. > > >=20 > Uh... the -fcall-saved-rdi would go with all the other ones. > Assuming it can actually work and that gcc doesn't choke on an > inbound argument being saved. Right, doh. Ok, just added it and it builds fine with a gcc (Gentoo 4.4.1 p1.0) 4.4.1. If you have suspicion that some older gcc versions might choke on it, I could leave the "=3DD" dummy constraint in? BTW, the current version screams /usr/src/linux-2.6/arch/x86/include/asm/arch_hweight.h: In function =E2= =80=98__arch_hweight64=E2=80=99: /usr/src/linux-2.6/arch/x86/include/asm/arch_hweight.h:47: warning: unu= sed variable =E2=80=98dummy=E2=80=99 on x86-32. I'll send a fixed version in a second. --=20 Regards/Gruss, Boris. - Advanced Micro Devices, Inc. Operating Systems Research Center -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild"= in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html