[AArch64] Add support for system register based stack protector canary access
authorRamana Radhakrishnan <ramana.radhakrishnan@arm.com>
Fri, 18 Jan 2019 10:32:40 +0000 (10:32 +0000)
committerRamana Radhakrishnan <ramana@gcc.gnu.org>
Fri, 18 Jan 2019 10:32:40 +0000 (10:32 +0000)
commitcd0b2d361df82c848dc7e1c3078651bb0624c3c6
tree9bf64856b6da788ce37851a53348ede044c34ba9
parentd0bf921f6a0b8ffdad74fa5eb5ddf2e70a9acfd6
[AArch64] Add support for system register based stack protector canary access

2019-01-18  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

        * config/aarch64/aarch64-opts.h (enum stack_protector_guard): New
        * config/aarch64/aarch64.c (aarch64_override_options_internal): Handle
        and put in error checks for stack protector guard options.
        (aarch64_stack_protect_guard): New.
        (TARGET_STACK_PROTECT_GUARD): Define.
        * config/aarch64/aarch64.md (UNSPEC_SSP_SYSREG): New.
        (reg_stack_protect_address<mode>): New.
        (stack_protect_set): Adjust for SSP_GLOBAL.
        (stack_protect_test): Likewise.
        * config/aarch64/aarch64.opt (-mstack-protector-guard-reg): New.
        (-mstack-protector-guard): Likewise.
        (-mstack-protector-guard-offset): Likewise.

From-SVN: r268068
gcc/ChangeLog
gcc/config/aarch64/aarch64-opts.h
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/aarch64.opt
gcc/doc/invoke.texi