Hi all,
this is to fix the regression of
g++.target/aarch64/return_address_sign_ab_exception.C that I
introduced with
d8dadbc9a5199bf7bac1ab7376b0f84f45e94350.
'aarch_ra_sign_key' for aarch64 ended up being non defined in the opt
file and the function attribute "branch-protection=pac-ret+leaf+b-key"
stopped working as expected.
This patch moves the definition of 'aarch_ra_sign_key' to the opt
files for both Arm back-ends.
Regards
Andera Corallo
gcc/ChangeLog:
* config/aarch64/aarch64-protos.h (aarch_ra_sign_key): Remove
declaration.
* config/aarch64/aarch64.cc (aarch_ra_sign_key): Remove
definition.
* config/aarch64/aarch64.opt (aarch64_ra_sign_key): Rename
to 'aarch_ra_sign_key'.
* config/arm/aarch-common.cc (aarch_ra_sign_key): Remove
declaration.
* config/arm/arm-protos.h (aarch_ra_sign_key): Likewise.
* config/arm/arm.cc (enum aarch_key_type): Remove definition.
* config/arm/arm.opt: Define.
AARCH64_CHECK_MOV = AARCH64_CHECK_ORR | AARCH64_CHECK_BIC
};
-extern enum aarch_key_type aarch_ra_sign_key;
-
extern struct tune_params aarch64_tune_params;
/* The available SVE predicate patterns, known in the ACLE as "svpattern". */
{NULL, aarch64_none, aarch64_none, aarch64_no_arch, 0, NULL}
};
-enum aarch_key_type aarch_ra_sign_key = AARCH_KEY_A;
-
/* The current tuning set. */
struct tune_params aarch64_tune_params = generic_tunings;
unsigned aarch_enable_bti = 2
TargetVariable
-enum aarch64_key_type aarch64_ra_sign_key = AARCH64_KEY_A
+enum aarch_key_type aarch_ra_sign_key = AARCH_KEY_A
; The TLS dialect names to use with -mtls-dialect.
#define BRANCH_PROTECT_STR_MAX 255
extern char *accepted_branch_protection_string;
-extern enum aarch_key_type aarch_ra_sign_key;
static enum aarch_parse_opt_result
aarch_handle_no_branch_protection (char* str, char* rest)
extern const arch_option all_architectures[];
extern const cpu_option all_cores[];
-extern enum aarch_key_type aarch_ra_sign_key;
const cpu_option *arm_parse_cpu_option_name (const cpu_option *, const char *,
const char *, bool = true);
tune_params::SCHED_AUTOPREF_OFF
};
-/* Key type for Pointer Authentication extension. */
-enum aarch_key_type aarch_ra_sign_key = AARCH_KEY_A;
-
char *accepted_branch_protection_string = NULL;
/* Auto-generated CPU, FPU and architecture tables. */
TargetVariable
unsigned aarch_enable_bti = 0
+TargetVariable
+enum aarch_key_type aarch_ra_sign_key = AARCH_KEY_A
+
Enum
Name(tls_type) Type(enum arm_tls_type)
TLS dialect to use: