[PATCH] Use ptr_mode to save/restore pointers in builtin jmpbuf
Richard Earnshaw (lists)
Richard.Earnshaw@arm.com
Tue Feb 6 11:38:00 GMT 2018
On 02/02/18 20:55, Eric Botcazou wrote:
>> But, that is not what the builtin setjmp/longjmp tests have.
>
> Yes, but I don't think that we want to risk breaking a working compiler on
> some targets because peculiar tests don't pass on another. I think that
> init_eh is OK for x32 so SJLJ exceptions work and the issue is only with the
> undocumented builtin setjmp/longjmp.
>
> What happens on Aarch64 -milp32 for example? Would it be OK to save/restore
> only 32-bit values? And MIPS n32?
>
No. At least, not for the frame pointer on AArch64. If the caller has
used FP as a normal register, then all 64 bits must be preserved. The
same is true of any other register that might also be used as a
non-frame-related register.
R.
More information about the Gcc-patches
mailing list