On Fri, Nov 02, 2018 at 01:38:25PM -0500, Sudakshina Das wrote:
> Hi
> 
> This patch is part of a series that enables ARMv8.5-A in GCC and
> adds Branch Target Identification Mechanism.
> (https://developer.arm.com/products/architecture/cpu-architecture/a-profile/exploration-tools)
> 
> NOTE: This patch is dependent on Sam Tebbs patch to deprecate
> -msign-return-address and add new -mbranch-protection option
> https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00104.html
> 
> 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". Since the BTI instructions, just like the return address
> signing instructions are in the HINT space, this option is not limited
> to ARMv8.5-A architecture version.
> 
> 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.
> 
> Bootstrapped and regression tested with aarch64-none-linux-gnu.
> Is this ok for trunk?

OK.

Thanks,
James

> *** gcc/ChangeLog ***
> 
> 2018-xx-xx  Sudakshina Das  <sudi....@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.

Reply via email to