Hi. Similarly to:
case OPT_mstrict_align: if (val) opts->x_target_flags |= MASK_STRICT_ALIGN; else opts->x_target_flags &= ~MASK_STRICT_ALIGN; return true; the MASK_GENERAL_REGS_ONLY mask should be handled the same way. @Sudakshina: The 'opts->x_target_flags |= MASK_STRICT_ALIGN' change is not backported to all active branches. Can you please do it? Ready to be installed? gcc/ChangeLog: 2020-05-21 Martin Liska <mli...@suse.cz> * common/config/aarch64/aarch64-common.c (aarch64_handle_option): Properly maask MASK_GENERAL_REGS_ONLY based on val. --- gcc/common/config/aarch64/aarch64-common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c index 51bd319d6d3..ef6b34025d9 100644 --- a/gcc/common/config/aarch64/aarch64-common.c +++ b/gcc/common/config/aarch64/aarch64-common.c @@ -98,7 +98,10 @@ aarch64_handle_option (struct gcc_options *opts, return true; case OPT_mgeneral_regs_only: - opts->x_target_flags |= MASK_GENERAL_REGS_ONLY; + if (val) + opts->x_target_flags |= MASK_GENERAL_REGS_ONLY; + else + opts->x_target_flags &= ~MASK_GENERAL_REGS_ONLY; return true; case OPT_mfix_cortex_a53_835769: