ada: Update personality function for CHERI purecap
commit198e643b35df4743e3177fc3a77b50325ae44717
authorDaniel King <dmking@adacore.com>
Wed, 23 Aug 2023 13:13:55 +0000 (23 14:13 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 26 Sep 2023 11:43:17 +0000 (26 13:43 +0200)
treeb4ee5592659761e4ed51b83bf9f4842089030bf7
parent0787c56c48750156783bd5d3280579e9c68a8aa5
ada: Update personality function for CHERI purecap

This makes two changes to the GNAT personality function to reflect
differences for pure capability CHERI/Morello. The first is to use
__builtin_code_address_from_pointer to drop the LSB from Morello
code pointers when searching through call-site tables (without this
we would never find the right landing pad when unwinding).

The second change is to reflect the change in the exception table
format for pure-capability Morello where the landing pad is a capability
indirected by an offset in the call-site table.

gcc/ada/

* raise-gcc.c (get_ip_from_context): Adapt for CHERI purecap
(get_call_site_action_for): Adapt for CHERI purecap
gcc/ada/raise-gcc.c