From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754386AbcEDUWU (ORCPT ); Wed, 4 May 2016 16:22:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:53558 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752763AbcEDUWS (ORCPT ); Wed, 4 May 2016 16:22:18 -0400 Date: Wed, 4 May 2016 22:22:13 +0200 From: Borislav Petkov To: "H. Peter Anvin" Cc: 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: <20160504202213.GF23257@pd.tnic> References: <57031D9D.801@gmail.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... sarge:~# gcc --version gcc (GCC) 3.3.5 (Debian 1:3.3.5-13) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. sarge:~# cat popcnt.c int main(void) { int a, b; asm volatile("popcnt %0, %1" : "=r" (a) : "r" (b)); return 0; } sarge:~# gcc -Wall -o popcnt{,.c} /tmp/ccHmmgjH.s: Assembler messages: /tmp/ccHmmgjH.s:14: Error: no such instruction: `popcnt %eax,%eax' sarge:~# -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --