This is the mail archive of the
mailing list for the libc-ports project.
Re: [Patch, mips]: Add support for FR=1/o32. Update implemention of setjmp/longjmp
- From: Doug Gilmore <Doug dot Gilmore at imgtec dot com>
- To: Joseph S.Myers <joseph at codesourcery dot com>, <libc-ports at sourceware dot org>
- Date: Tue, 3 Dec 2013 18:44:16 -0800
- Subject: Re: [Patch, mips]: Add support for FR=1/o32. Update implemention of setjmp/longjmp
- Authentication-results: sourceware.org; auth=none
- References: <D27A34061895C147B6015779E8B217303D4981CE at KLMAIL01 dot kl dot imgtec dot org> <Pine dot LNX dot 4 dot 64 dot 1311261609530 dot 25885 at digraph dot polyomino dot org dot uk>
On 11/26/2013 08:21 AM, Joseph S.Myers wrote:
Sorry for the delay in responding, there were issues with the
*context routines I wanted to understand more fully, thus the delay.
> On Tue, 26 Nov 2013, Matheus Almeida wrote:
>> This patch updates the definition of setjmp, longjmp and jmp_buf so that
>> on a call to setjmp/longjmp, all the required floating-point
>> callee-saved registers are properly saved/restored.
>> We are aware that updating the size of jmp_buf can potentially break
>> existing applications but we expect the number of applications built
>> with FR=1 mode to be very small, possibly zero. Nevertheless this should
>> be clearly stated in the release notes that existing applications built
>> with FR=1 (-mfp64) need to be recompiled in order to use new versions of
>> the library.
Good point, we will attend to that.
> I don't recall a response to
> <https://sourceware.org/ml/binutils/2013-09/msg00045.html>, and don't see
> one in the binutils list archives. I believe that just like the NaN
> changes, this needs to be considered as an incompatible ABI variant, with
> ELF header checks in the dynamic linker to ensure that all loaded objects
> are compatible (whether or not you also define new dynamic linker names
> for one or both of o32/-mfp64/legacy-NaN and o32/-mfp64/NaN-2008) -
> incompatibilities should be detected by the dynamic linker, not "need to
> be recompiled". I suggest looking at Maciej's NaN changes as a model.
Yes, this is definitely something we need to attend to.
> Also as suggested in that message to the binutils list, I think *context
> functions need updating
An important motivation for adding -mfp64 support is to efficiently
support the new MSA ISA, which requires the register file to operate
in -mfp64 mode when MSA instructions are executed. Since the
definition of ucontext_t is basically the kernel's struct sigcontext,
with possibly with some massaging some of the types used in the
definition, our preference is to wait in adding this functionality
once MSA context switching support is added to the Linux kernel.
If worse comes to worse we may have to live with the *context routines
not being supported properly, just as they are on X86_64 in AVX mode.
> as well as setjmp/longjmp, and there should be an
> ABI supplement document explaining o32 function call and return for
> What's the kernel.org kernel version with support for this feature (that
> is, the kernel that checks the ELF header flag and ensures the FPU is
> correctly set up for the process)? As with NaN-2008, arch_minimum_kernel
> should be set to the appropriate kernel version, or 10.0.0 until the
> relevant support is in the kernel.org tree.
In your follow-up message you wrote:
> Sorry, I see your "need to be recompiled" was about old -mfp64 binaries,
> which indeed we don't need to care about.
Is the kernel version check still a concern given that currently there
is no ToT kernel support for -mfp64? We just need to add the checks to
ensure the dynamic linker will only map compatible shared objects. Right?