Hi Kyrill,

> -----Original Message-----
> From: Kyrylo Tkachov <ktkac...@nvidia.com>
> Sent: Thursday, June 27, 2024 9:58 AM
> To: gcc-patches@gcc.gnu.org
> Cc: Richard Earnshaw <richard.earns...@arm.com>; Richard Sandiford
> <richard.sandif...@arm.com>
> Subject: [PATCH] aarch64: Remove RNG and MTE from -mcpu=neoverse-v2
> 
> Hi all,
> 
> According to the TRM for Neoverse V2 the Memory Tagging and RNG features
> are optional configurations of the core and may not always be present.
> Therefore -mcpu=neoverse-v2 shouldn't enable them, similar to how the crypto
> extensions aren’t enabled by default.
RNG is indeed optional, however Memory Tagging is not.  The table is a bit 
cryptic
but it distinguishes between three states: "supported", "supported using 
configurable
option" and "unsupported".

RNG is supported with configurable option, but MTE is "supported" (this wording 
seems to
be used for things that are mandatory.).  If you look in table 2-7 of the TRM 
it states
"The Neoverse-V2 core always implements MTE".

This can be confirmed by looking at the table A-204: ID_AA64PFR1_EL1 bit 
descriptions.
For MTE the register cannot be 0b000, i.e. even though MTE is architecturally 
optional,
it's not valid for a Neoverse-V2 core not to have MTE.

This means that the compiler should declare support for MTE as at the CPU level 
it's always
supported.

Kind Regards,
Tamar

> 
> Bootstrapped and tested on aarch64-none-linux-gnu.
> Does this reasoning make sense?
> Thanks,
> Kyrill

Reply via email to