From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id B36E03858036 for ; Mon, 21 Feb 2022 12:29:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B36E03858036 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 65F121042; Mon, 21 Feb 2022 04:29:57 -0800 (PST) Received: from localhost (unknown [10.32.98.88]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E38CA3F66F; Mon, 21 Feb 2022 04:29:56 -0800 (PST) From: Richard Sandiford To: Christer Solskogen via Gcc-help Mail-Followup-To: Christer Solskogen via Gcc-help , Christer Solskogen , richard.sandiford@arm.com Cc: Christer Solskogen Subject: Re: aarch64 feature modifiers References: Date: Mon, 21 Feb 2022 12:29:55 +0000 In-Reply-To: (Christer Solskogen via Gcc-help's message of "Mon, 21 Feb 2022 12:51:06 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Feb 2022 12:29:59 -0000 Christer Solskogen via Gcc-help writes: > On 21.02.2022 12:35, Richard Sandiford via Gcc-help wrote: >> Christer Solskogen via Gcc-help writes: >>> On https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html there's a >>> list of feature modifiers to -march and -mcpu. Is there a way to check >>> or detect what features are available on a particular CPU? >> >> If you want to compile for a specific CPU then it's better to use >> -mcpu= with no feature modifiers, and leave out -march. >> GCC will then make full use of the available features. >> E.g. -mcpu=neoverse-n1 (on its own) will enable all features >> available on Neoverse N1 and optimise code for Neoverse N1. >> >> If you're just curious which features a given CPU implements, >> you can find that out by compiling a dummy file with -mcpu. E.g.: >> >> echo | gcc -mcpu=neoverse-n1 -xc - -o - -S | grep '\.arch' >> >> will print out: >> >> .arch armv8.2-a+crc+fp16+rcpc+dotprod+profile BTW, I should have said that this only explicitly lists the *optional* features. It doesn't include features that are required by Armv8.2-A. > I see. Thank you. > Does that mean that the cortex-a72 doesn't really support the +crypto or > +simd? Or does that depend on what is built? +simd and +fp are implied by the armv8.2-a (and armv8-a). Cortex-A72 support for +crypto is optional, so you're right that it has to be specified explicitly when present. See the TRM for details: https://developer.arm.com/documentation/100095/0003 Thanks, Richard