This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] mips: Do not include hi and lo in __SYSCALL_CLOBBERS for R6
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Dragan Mladjenovic <dmladjenovic at wavecomp dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Tue, 19 Nov 2019 18:20:36 +0000
- Subject: Re: [PATCH] mips: Do not include hi and lo in __SYSCALL_CLOBBERS for R6
- Ironport-sdr: 9wKkGkCMrAKY/H3cYy7bwyIizJY7o05WrdSjTNVrfw2by4wG7HjvOP4bzyoNwPVaFPuXR3JV++ FqCVppSpSxZWJqRXKSOXUe00pNKpEVuGAFZOFTURIa0IPvyxcR4MuKxocmjqGI2fd1zB+H8uEo rfo1mi6GTpTpj53LL1avrf8VvUlxWmWnnGyqd7nVG4MCyM/HwLTz1CwfMBbqkfBhgYSdyLkfCw MFFI5WJKXaF6rlQoaXDxqHjVniipKuS2boMCiZkf9lhgglqYx2Jk0C0WP8dAzvMK/7KcJsl9ce X38=
- Ironport-sdr: ZjkWykv6k9vWpKDc8fILZ+LPHL3YLKZL0lrgYkPLS1ch+Q37rM3jqi0GSdPYmIsSz95P5i03ae EeKs0ZfBF5HF+PGcDtdk7SZAnC+MKhUGJZTae8izGth8tjleASnzukPiQDRlF6FppeSSXBp/EH lQPAHjwBCipmoc6GQPpWx0hfXZzvn6x1Q52Oh+qXGcy/Dp3ZScn8q1ZrJt4riUBgr4wOLdHy3t RKAvGYF74WXo1VmxZ6NwsIVKPGeWF3zh8XS5N0QVG+0a30tTISstpo6lHqpcWi1NPAGCCliQaq GVE=
- References: <1574175364-5601-1-git-send-email-dmladjenovic@wavecomp.com> <alpine.DEB.2.21.1911191653090.7856@digraph.polyomino.org.uk> <5DD4301E.8030704@wavecomp.com>
On Tue, 19 Nov 2019, Dragan Mladjenovic wrote:
> > What is the kernel ABI on r6 systems with the DSP extension - does the
> > kernel ABI permit the kernel to clobber those registers on syscall return
> > or not? This patch looks like it's only safe if the kernel guarantees it
> > will never clobber those registers on r6 (or later), regardless of
> > instruction set extensions present.
>
> The kernel is not allowed to use DSP ASE. From what I see the DSP state
> is not restored on syscall exit. Only some vendor specific extension are
> allowed in the kernel. From what I understand that on "happy path"
> kernel just saves some registers and relies on C ABI to preserve the
> rest. The use of hi and lo is result of them not being preserved across
> the function calls in C.
Thanks. If this means the kernel always preserves hi and lo for r6,
regardless of extensions available, then the patch is OK to commit. Note
that we no longer include GNU-style ChangeLog entries in commit messages.
--
Joseph S. Myers
joseph@codesourcery.com