diff mbox series

[v2,09/11] aarch64: Use constructor explicitly in get_flags_off

Message ID 5420b600-52cc-5aef-ccc2-532b57022f24@e124511.cambridge.arm.com
State New
Headers show
Series aarch64: Extend aarch64_feature_flags to 128 bits | expand

Commit Message

Andrew Carlotti July 11, 2024, 12:15 p.m. UTC
gcc/ChangeLog:

	* config/aarch64/aarch64-feature-deps.h
	(get_flags_off): Construct aarch64_feature_flags (0) explicitly.

Comments

Richard Sandiford July 11, 2024, 5:22 p.m. UTC | #1
Andrew Carlotti <andrew.carlotti@arm.com> writes:
> gcc/ChangeLog:
>
> 	* config/aarch64/aarch64-feature-deps.h
> 	(get_flags_off): Construct aarch64_feature_flags (0) explicitly.

OK, thanks.

Richard

> diff --git a/gcc/config/aarch64/aarch64-feature-deps.h b/gcc/config/aarch64/aarch64-feature-deps.h
> index 79126db88254b89f74a8583d50a77bc27865e265..a14ae22b72980bef5eec80588f06d9ced895dfd7 100644
> --- a/gcc/config/aarch64/aarch64-feature-deps.h
> +++ b/gcc/config/aarch64/aarch64-feature-deps.h
> @@ -97,9 +97,10 @@ template<aarch64_feature> struct info;
>  constexpr aarch64_feature_flags
>  get_flags_off (aarch64_feature_flags mask)
>  {
> -  return (0
> +  return (aarch64_feature_flags (0)
>  #define AARCH64_OPT_EXTENSION(A, IDENT, C, D, E, F) \
> -	  | (feature_deps::IDENT ().enable & mask ? AARCH64_FL_##IDENT : 0)
> +	  | (feature_deps::IDENT ().enable & mask ? AARCH64_FL_##IDENT \
> +						  : aarch64_feature_flags (0))
>  #include "config/aarch64/aarch64-option-extensions.def"
>  	  );
>  }
diff mbox series

Patch

diff --git a/gcc/config/aarch64/aarch64-feature-deps.h b/gcc/config/aarch64/aarch64-feature-deps.h
index 79126db88254b89f74a8583d50a77bc27865e265..a14ae22b72980bef5eec80588f06d9ced895dfd7 100644
--- a/gcc/config/aarch64/aarch64-feature-deps.h
+++ b/gcc/config/aarch64/aarch64-feature-deps.h
@@ -97,9 +97,10 @@  template<aarch64_feature> struct info;
 constexpr aarch64_feature_flags
 get_flags_off (aarch64_feature_flags mask)
 {
-  return (0
+  return (aarch64_feature_flags (0)
 #define AARCH64_OPT_EXTENSION(A, IDENT, C, D, E, F) \
-	  | (feature_deps::IDENT ().enable & mask ? AARCH64_FL_##IDENT : 0)
+	  | (feature_deps::IDENT ().enable & mask ? AARCH64_FL_##IDENT \
+						  : aarch64_feature_flags (0))
 #include "config/aarch64/aarch64-option-extensions.def"
 	  );
 }