Re: [Mingw-w64-public] setjmp/longjmp on ARM64 with generated code

2022-03-30 Thread Martin Storsjö
On Wed, 30 Mar 2022, LIU Hao wrote: 在 2022-03-30 04:53, Martin Storsjö 写道: After some back-and-forth, we found that __mingw_setjmp/__mingw_longjmp do work in this case, but it is not obvious how to satisfy the conditions in the headers to switch to that implementation without switching the

Re: [Mingw-w64-public] setjmp/longjmp on ARM64 with generated code

2022-03-29 Thread Jeremy Drake via Mingw-w64-public
On Tue, 29 Mar 2022, Jeremy Drake via Mingw-w64-public wrote: > On Wed, 30 Mar 2022, LIU Hao wrote: > > > Does it make sense to use `__builtin_setjmp()` and `__builtin_longjmp()` > > here? > > I am not sure whether Clang supports these. On x86 they restore only the BP > > and SP registers (other

Re: [Mingw-w64-public] setjmp/longjmp on ARM64 with generated code

2022-03-29 Thread Jeremy Drake via Mingw-w64-public
On Wed, 30 Mar 2022, LIU Hao wrote: > Does it make sense to use `__builtin_setjmp()` and `__builtin_longjmp()` here? > I am not sure whether Clang supports these. On x86 they restore only the BP > and SP registers (other caller-saved registers are not preserved) and do not > unwind the stack, so t

Re: [Mingw-w64-public] setjmp/longjmp on ARM64 with generated code

2022-03-29 Thread LIU Hao
在 2022-03-30 04:53, Martin Storsjö 写道: After some back-and-forth, we found that __mingw_setjmp/__mingw_longjmp do work in this case, but it is not obvious how to satisfy the conditions in the headers to switch to that implementation without switching the exception model, which seems like it co

Re: [Mingw-w64-public] setjmp/longjmp on ARM64 with generated code

2022-03-29 Thread Martin Storsjö
On Tue, 29 Mar 2022, Jeremy Drake via Mingw-w64-public wrote: A discussion came up today on MSYS2 Discord about trying to build qemu for Windows ARM64 (https://discord.com/channels/792780131906617355/794889490941476915/958319683902259250). Apparently QEMU is trying to use setjmp/longjmp within

[Mingw-w64-public] setjmp/longjmp on ARM64 with generated code

2022-03-29 Thread Jeremy Drake via Mingw-w64-public
A discussion came up today on MSYS2 Discord about trying to build qemu for Windows ARM64 (https://discord.com/channels/792780131906617355/794889490941476915/958319683902259250). Apparently QEMU is trying to use setjmp/longjmp within TCG-generated code, and that is failing on ARM64 with 0xc0ff