> On 10 May 2025, at 06:17, Andrew Pinski <quic_apin...@quicinc.com> wrote:
> 
> Since the AARCH64_CORE defines in aarch64-cores.def all use -1 for
> the variant, it is just easier to add the cast to unsigned in the usage
> in driver-aarch64.cc.
> 
> Build and tested on aarch64-linux-gnu.

Ok.
Thanks,
Kyrill

> 
> gcc/ChangeLog:
> 
> PR target/118603
> * config/aarch64/driver-aarch64.cc (aarch64_cpu_data): Add cast to unsigned
> to VARIANT of the define AARCH64_CORE.
> 
> Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>
> ---
> gcc/config/aarch64/driver-aarch64.cc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/config/aarch64/driver-aarch64.cc 
> b/gcc/config/aarch64/driver-aarch64.cc
> index 9d99554dbc2..0333746ee00 100644
> --- a/gcc/config/aarch64/driver-aarch64.cc
> +++ b/gcc/config/aarch64/driver-aarch64.cc
> @@ -63,7 +63,7 @@ struct aarch64_core_data
> #define DEFAULT_CPU "generic-armv8-a"
> 
> #define AARCH64_CORE(CORE_NAME, CORE_IDENT, SCHED, ARCH, FLAGS, COSTS, IMP, 
> PART, VARIANT) \
> -  { CORE_NAME, #ARCH, IMP, PART, VARIANT, feature_deps::cpu_##CORE_IDENT },
> +  { CORE_NAME, #ARCH, IMP, PART, unsigned(VARIANT), 
> feature_deps::cpu_##CORE_IDENT },
> 
> static CONSTEXPR const aarch64_core_data aarch64_cpu_data[] =
> {
> -- 
> 2.43.0
> 

Reply via email to