[PATCH v3 2/2] aarch64: Disable sysreg guards by default

Jan Beulich jbeulich@suse.com
Thu Jul 10 07:11:18 GMT 2025


On 10.07.2025 02:16, Alice Carlotti wrote:
> --- a/opcodes/aarch64-opc.c
> +++ b/opcodes/aarch64-opc.c
> @@ -5162,6 +5162,13 @@ aarch64_sys_reg_alias_p (const uint32_t reg_flags)
>    return (reg_flags & F_REG_ALIAS) != 0;
>  }
>  
> +static bool aarch64_sysreg_checking_enabled = false;
> +
> +void aarch64_set_sysreg_checks (bool value)
> +{
> +  aarch64_sysreg_checking_enabled = value;
> +}

While for gas this may be okay, such use of static variables isn't quite
nice in what can be built as a shared library. Perhaps okay(ish) for the
time being, but in the longer run (next release?) gas-only code may want
moving to gas then?

Or, seeing there are only very few invocations of the two affected
libopcode functions, maybe put the checks at the call sites instead of
here?

Jan


More information about the Binutils mailing list