Szabolcs Nagy <szabolcs.n...@arm.com> writes: > v2: > - emit bti based on feedback from Richard Sandiford > (dont copy varasm logic). > - add testcases. > - kept bti outside the patch area if possible, i.e. option (b) > in earlier discussion. > > This fix does not update the documentation of the generic > option, I think some text would be useful there about patch > area layout with indirect branch hardening (but i wanted > to keep this fix target specific).
Thanks for the update. Looks great to me, and given Mark's response, I agree we should go ahead with this as-is rather than try to change the position of the BTI. > gcc/ChangeLog: > > 2020-01-21 Szabolcs Nagy <szabolcs.n...@arm.com> > > * config/aarch64/aarch64.c (aarch64_declare_function_name): Set > cfun->machine->label_is_assembled. > (aarch64_print_patchable_function_entry): New. > (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY): Define. > * config/aarch64/aarch64.h (struct machine_function): New field, > label_is_assembled. > > gcc/testsuite/ChangeLog: > > 2020-01-21 Szabolcs Nagy <szabolcs.n...@arm.com> > > * gcc.target/aarch64/pr92424-1.c: New test. > * gcc.target/aarch64/pr92424-2.c: New test. > * gcc.target/aarch64/pr92424-3.c: New test. OK. Same in principle for the backport too, but check-function-bodies is only available on master. Richard