https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84521

--- Comment #21 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> You can use __builtin_setjmp and __builtin_longjmp in the same function,
> only if they use a different buffer.  Otherwise it is invalid.

Yes, that's invalid.

> CCing Eric for the other __builtin_setjmp related issues.

I don't see anything special with Aarch64 that would make it impossible to
support __builtin_setjmp/__builtin_longjmp properly.  You can parameterize a
lot of things in the back-end with TARGET_BUILTIN_SETJMP_FRAME_VALUE and
various patterns like:
  save_stack_nonlocal
  restore_stack_nonlocal,
  nonlocal_goto_receiver,
  builtin_setjmp_setup,
  builtin_setjmp_receiver,
  builtin_longjmp
See the documentation and existing ports.

Reply via email to