On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote:
Hi,
Add -mbranch-protection option and its associated parsing routines.
This option enables the code-generation of pointer signing and
authentication instructions in function prologues and epilogues.
Tested on arm-none-eabi. OK for trunk?
2021-10-04 Tejas Belagod <tbela...@arm.com>
gcc/ChangeLog:
* common/config/arm/arm-common.c
(arm_print_hit_for_pacbti_option): New.
(arm_progress_next_token): New.
(arm_parse_pac_ret_clause): New routine for parsing the
pac-ret clause for -mbranch-protection.
(arm_parse_pacbti_option): New routine to parse all the options
to -mbranch-protection.
* config/arm/arm-protos.h (arm_parse_pacbti_option): Export.
* config/arm/arm.c (arm_configure)build_target): Handle option
to -mbranch-protection.
* config/arm/arm.opt (mbranch-protection). New.
(arm_enable_pacbti): New.
You're missing documentation for invoke.texi.
Also, how does this differ from the exising option in aarch64? Can the
code from that be adapted to be made common to both targets rather than
doing a new implementation?
Finally, there are far to many manifest constants in this patch, they
need replacing with enums or #defines as appropriate if we cannot share
the aarch64 code.
R.