[AArch64, 4/6] Enable BTI: Add new <type> to -mbranch-protection.
This patch is part of a series that enables ARMv8.5-A in GCC and adds Branch Target Identification Mechanism. This pass updates the CLI of -mbranch-protection to add "bti" as a new type of branch protection and also add it its definition of "none" and "standard". The option does not really do anything functional. The functional changes are in the next patch. I am initializing the target variable aarch64_enable_bti to 2 since I am also adding a configure option in a later patch and a value different from 0 and 1 would help identify if its already been updated. *** gcc/ChangeLog *** 2018-01-09 Sudakshina Das <sudi.das@arm.com> * config/aarch64/aarch64-protos.h (aarch64_bti_enabled): Declare. * config/aarch64/aarch64.c (aarch64_handle_no_branch_protection): Disable bti for -mbranch-protection=none. (aarch64_handle_standard_branch_protection): Enable bti for -mbranch-protection=standard. (aarch64_handle_bti_protection): Enable bti for "bti" in the string to -mbranch-protection. (aarch64_bti_enabled): Check if bti is enabled. * config/aarch64/aarch64.opt: Declare target variable. * doc/invoke.texi: Add bti to the -mbranch-protection documentation. From-SVN: r267768
Showing
Please
register
or
sign in
to comment