Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp778506ybh; Sat, 18 Jul 2020 21:48:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuINe2FrDWx+30vnAMWlyq0tgUuzKCHbIjTdfgNk+ALQykwx837rfqehzCYuEqbdzpEPcN X-Received: by 2002:a05:6402:1778:: with SMTP id da24mr16548145edb.126.1595134089628; Sat, 18 Jul 2020 21:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595134089; cv=none; d=google.com; s=arc-20160816; b=WkcDAFVNVoR499puqoQtaojxiGbO2n+Hx7ZqN7ZVHka/cd9Tybt937GERhqHPTTQH9 JX+/NUrsQHsgNKCT9ZfP1kEr7Ebuk9VNpvBLGRHnp/NWgNS7e+Q88PXOvyqnigFuoQM/ QnxVT7sjmYYULddW84A+cyK3uGScSSb8OmIQQGFNtznlaFX+dMaojDMc7zuINBc2eaMn wCtrlu8K+zahXCJvT8/c/diUrMqhFf0te3FDcYrwbWMIg3If8uTShcePpPJmnT0K0OKN U9yREDqZtD7fxdfSaeEIsHj485aTowHfx/C7hCaocIlv6i3kGUVU0GJoI/dulAAjiki9 EecA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=FEoJHD8hLAwDISEozbsWN4K8QUnQ9MVeLY2tTbYM424=; b=ldsxhoKzHRqBpzk9SQVIjq9o7ZtlxAgyf4ISMDjXGA5Lzb0X3r+LbwOoQunBbwUUgG o/cz/WWZHrA4nzyFvPE0xBBdEQJ0AlbPd11AJ2yfF7bOzmSdpEykhOk+VyykpcO0SNW6 f4vW4ptsXK7G8wcp4nno+KDFhWMqq+mXlW+h3WMko7tKs5JTsR8rtewL6sQaAviG84E5 825Y+VFi2KmhL30m/bxkuVJ6/BAitI+5Q9jCRWuxz8qYmlaksDNUKlvwDCh6E9uWHiDF ehBNhyh7WfDPofsQ0o2jKKx3obQ4qCwugH3t48Ig8A0OruaboYYAfy6JwHJHP5GeW/Qx 4ARg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=hrJ7LWeC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o21si7107405ejb.37.2020.07.18.21.47.47; Sat, 18 Jul 2020 21:48:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=hrJ7LWeC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725875AbgGSEpZ (ORCPT + 99 others); Sun, 19 Jul 2020 00:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725440AbgGSEpZ (ORCPT ); Sun, 19 Jul 2020 00:45:25 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C9B6C0619D2 for ; Sat, 18 Jul 2020 21:45:25 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id t15so8299138pjq.5 for ; Sat, 18 Jul 2020 21:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=FEoJHD8hLAwDISEozbsWN4K8QUnQ9MVeLY2tTbYM424=; b=hrJ7LWeCm+YQ69Xb47AIhO5dpMNdzPX71K6khpcnhJMpjt0trlngYgwgk7hGYbZ/qZ l2n93XcHxwCsQ3CEtTMuWHZRUN5wTr1T/kGZK38Pi+NyXKpk3wPoQ2HUzYn1CvcXEipU 0tzFrzapWEUm/GDHl3EeieMfjwEILRTlcg7n/hc3j56TQgZbVvzy1fDB5ZmheEEOxI+Q vfGaCjd5xUuKG9iAPSIJ5K5rrsL0ZKAXU+erh+mzEpQSb3oINWYA/iSIX1bIxJxqgkcM OWm/B1jFz7muRwkqUQxmc0W0kIGdd7hETLOIYpJx4xtI2S5SLgNY+VTJNSTIyw1qv0BH IA/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=FEoJHD8hLAwDISEozbsWN4K8QUnQ9MVeLY2tTbYM424=; b=UuHZ3Esxw/gtjl5B06L7aXD7V6ajYsl4KJzGUMTJuiKuaUVGQT70Hs8YvhXPBksjDF mehCM5NVNQcTPJUk8H7jwtoaluIB7bi7vlOMQpcWIA2A2BeHHFDwmsAKBk6EzzwgKb8V eXTdvgCvDRpsCG8l2gWc1JL4kr2Q3/sg30tyaK3yDmU8RKHCL5aZdc4AvgGwwCgilWqy LHpHEm52vxZdyQh2efX0R2s03+UNuam1Lt2DtFUK1dVYCLpmR9CExwPrhgqrEIxQs19C lQdnYG4juDLlbWLPMRSpg6jTYO9lHAqlA9AjymdvsPF99Agb6wiawu67hDBxcN64dLza QLJQ== X-Gm-Message-State: AOAM532TLv5SkfRR6OchLbtZMHnyOW8+amhPFvjVzkNXrBEGU71wtzCM lBEuItQf4cZgxolQJgZI/IvH4g== X-Received: by 2002:a17:90a:21c3:: with SMTP id q61mr17252158pjc.207.1595133924391; Sat, 18 Jul 2020 21:45:24 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id i66sm11639093pfc.12.2020.07.18.21.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 21:45:23 -0700 (PDT) Date: Sat, 18 Jul 2020 21:45:23 -0700 (PDT) X-Google-Original-Date: Sat, 18 Jul 2020 21:45:20 PDT (-0700) Subject: Re: [PATCH 1/1] riscv: Enable compiler optimizations In-Reply-To: <20200708054354.25283-1-maochenxi@eswin.com> CC: Paul Walmsley , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, chenxi.mao2013@gmail.com, maochenxi@eswin.com From: Palmer Dabbelt To: maochenxi@eswin.com, ardb@kernel.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 07 Jul 2020 22:43:54 PDT (-0700), maochenxi@eswin.com wrote: > Enable ARCH_HAS_FAST_MULTIPLIER and ARCH_SUPPORTS_INT128 for better > code generation. > These 2 configurations works fine on GCC-9.3 and GCC-10.1 > > Signed-off-by: Chenxi Mao > --- > arch/riscv/Kconfig | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index 128192e14ff2..f21b7e5188ca 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -26,6 +26,8 @@ config RISCV > select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU > select ARCH_WANT_FRAME_POINTERS > select ARCH_WANT_HUGE_PMD_SHARE if 64BIT > + select ARCH_HAS_FAST_MULTIPLIER > + select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000 || CC_IS_CLANG IIRC int128 is only supported on 64-bit targets, and we already have this under RV64I but with a different set of requirements. It looks like everyone has a different set of requirements, but I feel like CC_HAS_INT128 is the right way to go. I'm not sure why we have the version check there. Ard: do you know why we would need both? The fast multiplier one looks fine to me. They're supposed to stay alphabetical, though. > select CLONE_BACKWARDS > select COMMON_CLK > select EDAC_SUPPORT