This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Use ptr_mode to save/restore pointers in builtin jmpbuf
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Tue, 6 Feb 2018 04:27:12 -0800
- Subject: Re: [PATCH] Use ptr_mode to save/restore pointers in builtin jmpbuf
- Authentication-results: sourceware.org; auth=none
- References: <20180201001627.GA21117@gmail.com> <3874588.EQjNKs4VoA@polaris> <CAMe9rOp7BB6oc8fLP2QD9+a0=K-3USN-DRai7ykW47sRiR0JJg@mail.gmail.com> <8206435.hoiVHVAjsD@polaris> <83ae45bb-7dce-cf9f-c66d-389c98c17970@arm.com>
On Tue, Feb 6, 2018 at 3:38 AM, Richard Earnshaw (lists)
<Richard.Earnshaw@arm.com> wrote:
> 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.
If FP is used as a normal register, it won't be saved as frame pointer
in builtin
jmp buffer.
--
H.J.