From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753848AbcEDVKB (ORCPT ); Wed, 4 May 2016 17:10:01 -0400 Received: from one.firstfloor.org ([193.170.194.197]:56492 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752311AbcEDVKA (ORCPT ); Wed, 4 May 2016 17:10:00 -0400 Date: Wed, 4 May 2016 14:09:57 -0700 From: Andi Kleen To: Borislav Petkov Cc: "H. Peter Anvin" , Brian Gerst , LKML , Dmitry Vyukov , Andi Kleen , zengzhaoxiu@163.com, Thomas Gleixner , Ingo Molnar , Denys Vlasenko , Andrew Morton , Kees Cook , Zhaoxiu Zeng , Andy Lutomirski , Peter Zijlstra Subject: Re: [RFC PATCH] x86/hweight: Get rid of the special calling convention Message-ID: <20160504210957.GN13997@two.firstfloor.org> References: <1459934085-7152-1-git-send-email-zengzhaoxiu@163.com> <87wpoay10o.fsf@tassilo.jf.intel.com> <20160407094333.GD3866@pd.tnic> <20160504184612.GC23257@pd.tnic> <5998407c-3497-22c1-45dc-a86afcb73c94@zytor.com> <20160504194101.GE23257@pd.tnic> <20160504202213.GF23257@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160504202213.GF23257@pd.tnic> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 04, 2016 at 10:22:13PM +0200, Borislav Petkov wrote: > On Wed, May 04, 2016 at 12:49:17PM -0700, H. Peter Anvin wrote: > > Sigh. Doesn't look like -Wa is going to help due to the lack of the > > equivalent of an -include option in gas. > > So much for the register "freedom" - I'll resurrect the hardcoded insn > bytes. :-\ > > Unless my gcc friends have some other ideas... You can probe the assembler in the Makefile and pass a define, like it is done by the dwarf code. When the define is not set use the hard coded registers Not very scalable, but may work in this case. Longer term would probably need compiler probes at Kconfig time (this would be useful for a lot of things) -Andi -- ak@linux.intel.com -- Speaking for myself only.