Comment by eqvinox

8 hours ago

> Instead, when returning an error, rather than jumping to the return address, we look it up in the side table to find a corresponding error recovery address, and jump to that. Stack unwinding!

Since this is a custom ABI, how about just adding something large enough (cacheline sized, e.g. 64) to the return address? Saves the table shenanigans. Just tell the codegen to force emit the error path at that address... (I wonder if LLVM can actually do that...)

This is a good direction - many ABI's provide for this kind of thing at the top of the stack for interrupts (meaning x-bytes below the downward-growing stack are reserved by the OS).