According to C and C++ standard, there is a proposal on defining a new exception handling system. It runs by returning 2 registers + a boolean discriminant.
I suggest to define the ABI now by using r12 register as the register for storing that boolean discriminant flag to indicate the function throws an exception or not.
https://github.com/loongson/la-abi-specs/blob/release/lapcs.adoc
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0709r4.pdf https://www.open-std.org/JTC1/SC22/WG14/www/docs/n2429.pdf
According to C and C++ standard, there is a proposal on defining a new exception handling system. It runs by returning 2 registers + a boolean discriminant.
I suggest to define the ABI now by using r12 register as the register for storing that boolean discriminant flag to indicate the function throws an exception or not.