This specifies the encodings used for the personality function, LSDA and type info for exception handling.
Details
Diff Detail
Event Timeline
I kept them as separate changes since they're incremental and I thought it would make things easier to review, but I can squash them into one patch if that is more convenient. At the very least I plan on keeping D63415 separate as it includes generic changes.
I found that the test case in this patch will trigger an assertion failed without D63411 and there is no test case for D63411. So, I suggest these two patches could be combined at least. It will make review and verification easier.
If you want to keep D63415 as a stand alone patch, you should create a test case for it. I think D63415 and D63416 could be combined. You could think D63416 is a show case about how to specify “call site encoding” in architecture dependent part and why you want to do these generic changes. It is only my opinion. For your reference. BTW, your modification looks good.
Hi Ed, this is really hard to review without any documentation in the psABI or otherwise. Can you confirm that you've verified this matches gcc/gas? Are you planning to submit document to riscv-elf-psabi-doc to reflect this?
I've opened a pull request on the psABI docs (https://github.com/riscv/riscv-elf-psabi-doc/pull/110). I'm not entirely sure the details here are relevant to the ABI though. As far as I'm aware provided the individual CIE and FDEs are well-formed it shouldn't matter if the encodings differ from those specified in other CIE and FDEs.
On another note, after taking a look at the GCC code for this I'm not convinced the non-PIC values for the encodings match. GCC appears to just encode everything as pc-relative sdata4, whereas the above encodes things as absolute when PIC is not specified.
Yes, I was trying to cross-reference to what GCC does and couldn't see a match for everything you specify here.
Many thanks for submitting that PR, as you say it's not clear where it belongs but it's certainly useful to have it written down somewhere!