https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114843
--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Wilco from comment #10) > Since the whole eh_return is an internal ABI in libgcc, a fix would be to > change EH_RETURN_DATA_REGNO(N) to avoid x0 and x1. Since eh_return already > reserves 7 registers(!) and now need to avoid using x0/x1 too, using x2-x5 > and x6,x7 and x9 for the other special registers should work. You can't change EH_RETURN_DATA_REGNO now because it is not just internal ABI to libgcc, it is part of libstdc++v3 too (libsupc++/eh_personality.cc): /* For targets with pointers smaller than the word size, we must extend the pointer, and this extension is target dependent. */ _Unwind_SetGR (context, __builtin_eh_return_data_regno (0), __builtin_extend_pointer (ue_header)); _Unwind_SetGR (context, __builtin_eh_return_data_regno (1), handler_switch_value); And libobjc: exception.c:#define __builtin_eh_return_data_regno(x) x exception.c: _Unwind_SetGR (context, __builtin_eh_return_data_regno (0), exception.c: _Unwind_SetGR (context, __builtin_eh_return_data_regno (1), And really any exception personality.