arm: add unwinder encoding support for PACBTI
authorTejas Belagod <Tejas.Belagod@arm.com>
Thu, 28 Oct 2021 14:44:42 +0000 (15:44 +0100)
committerPrzemyslaw Wirkus <przemyslaw.wirkus@arm.com>
Thu, 28 Oct 2021 14:56:02 +0000 (15:56 +0100)
commit8c2999954bd3aa5853f553eb6a050dd38e6d9029
tree87d057cb1110b7568980730308d0545df3c26ca3
parenta1ff87d77ca7fa851170702fd972ae3d31f2e378
arm: add unwinder encoding support for PACBTI

This patch adds support for encoding the Return Address Authentication pseudo
register - '.save {ra_auth_code}' as defined by the DWARF ABI - in the
exception tables where the opcode is defined by the EHABI

gas/Changelog:

* config/tc-arm.c (arm_reg_type): Add new type REG_TYPE_PSEUDO.
(reg_expected_msgs): Add message for pseudo reg type.
(reg_list_els): Add new reg list type REGLIST_PSEUDO.
(parse_reg_list): Handle new REGLIST_PSEUDO type.
(s_arm_unwind_save_pseudo): Encode pseudo reg list save in exception
tables.
(s_arm_unwind_save): Handle new REG_TYPE_PSEUDO.
(reg_names): Add ra_auth_code pseudo register.
* testsuite/gas/arm/unwind-pacbti-m.s: New test.
* testsuite/gas/arm/unwind-pacbti-m.d: New test.
* testsuite/gas/arm/unwind-pacbti-m-readelf.d: New test.
gas/config/tc-arm.c
unwind-pacbti-m-readelf.d [new file with mode: 0644]
unwind-pacbti-m.d [new file with mode: 0644]
unwind-pacbti-m.s [new file with mode: 0644]