Question about setjmp_aux.c on MIPS
Florian Weimer
fweimer@redhat.com
Thu Nov 26 12:37:53 GMT 2020
* Huang Pei:
> For ld.so, it is not intended to use floating point instruction, but the
> __sigsetjmp from _dl_catch_exception touch FP regs repeatedly as loading
> DSOs, which cause unneeded FP context saving and restoring between tasks
> that does not use FP at all, I wonder if this can be avoided.
I think I have posted patches to move _dl_catch_exception into ld.so
(“elf: Rework exception handling in the dynamic loader [BZ #25486]”).
Once they are merged, you could special-case setjmp for use within ld.so
not to save & restore floating point state when compiled for
IS_IN (rtld).
> +. MIPS, link other RISC with hard floating point suppport need to save
> callee-saved FP in setjmp_aux.c, but setjmp.S for x86/x86_64 DOES NOT
> save any x87/SSE regs, does anyone know why?
The official x86-64 ABI does not have any non-volatile/callee-saved
floating point registers. We have code to save and restore floating
point state in the lazy binding trampoline because floating point
registers are used to pass arguments and return results, but that's it.
> +. Does MIPS need to save MSA reg as PowerPC does for VSX in setjmp_aux.c?
Hard to tell, it really depends on ABI details.
> +. I see x86/x86-64/ARM64 say no need to save sigmask in ld.so, can
> MIPS does this too?
I think so, yes.
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
More information about the Libc-help
mailing list