From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753303AbdJaKnh (ORCPT ); Tue, 31 Oct 2017 06:43:37 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33952 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752811AbdJaKng (ORCPT ); Tue, 31 Oct 2017 06:43:36 -0400 Date: Tue, 31 Oct 2017 10:43:32 +0000 From: Mark Rutland To: "Jason A. Donenfeld" Cc: linux-arm-kernel@lists.infradead.org, LKML Subject: Re: CONFIG_ARCH_SUPPORTS_INT128 for AArch64 Message-ID: <20171031104332.gqpd6icvrxt2uj4c@lakrids.cambridge.arm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 31, 2017 at 11:17:52AM +0100, Jason A. Donenfeld wrote: > Hi folks, > > Older versions of gcc are horrible for int128_t on aarch64, emitting a > __multi3 call, which is slow and defeats the purpose. However, more > recent versions of gcc (since 5, IIRC), do the right thing and produce > the proper inlined instructions. > > Do we have the infrastructure available to test for this, and > conditionally set CONFIG_ARCH_SUPPORTS_INT128 if we do? Judging by Documentation/kbuild/makefiles.txt, we could do something like the below in the arm64 Makefile: cflags-y += $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128) Note that I havent tested this at all. Thanks,