Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751133AbdCQMJ6 (ORCPT ); Fri, 17 Mar 2017 08:09:58 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:44344 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751018AbdCQMJy (ORCPT ); Fri, 17 Mar 2017 08:09:54 -0400 Date: Fri, 17 Mar 2017 13:08:55 +0100 From: Peter Zijlstra To: Michael Davidson Cc: Michal Marek , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Herbert Xu , "David S. Miller" , Shaohua Li , Alexander Potapenko , Dmitry Vyukov , Matthias Kaehlcke , x86@kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-raid@vger.kernel.org Subject: Re: [PATCH 5/7] x86, boot, LLVM: Use regparm=0 for memcpy and memset Message-ID: <20170317120855.zwqame63yvy5afhg@hirez.programming.kicks-ass.net> References: <20170317001520.85223-1-md@google.com> <20170317001520.85223-6-md@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170317001520.85223-6-md@google.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 565 Lines: 12 On Thu, Mar 16, 2017 at 05:15:18PM -0700, Michael Davidson wrote: > Use the standard regparm=0 calling convention for memcpy and > memset when building with clang. > > This is a work around for a long standing clang bug > (see https://llvm.org/bugs/show_bug.cgi?id=3997) where > clang always uses the standard regparm=0 calling convention > for any implcit calls to memcpy and memset that it generates > (eg for structure assignments and initialization) even if an > alternate calling convention such as regparm=3 has been specified. Seriously, fix LLVM already.