This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/4] aarch64: Re-implement setcontext without sigreturn syscall
- From: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- To: Will Newton <will dot newton at linaro dot org>, catalin dot marinas at arm dot com
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 17 Mar 2014 17:48:34 +0000
- Subject: Re: [PATCH 2/4] aarch64: Re-implement setcontext without sigreturn syscall
- Authentication-results: sourceware.org; auth=none
- References: <1394707543-9690-1-git-send-email-will dot newton at linaro dot org> <1394707543-9690-2-git-send-email-will dot newton at linaro dot org>
On 13 March 2014 10:45, Will Newton <will.newton@linaro.org> wrote:
> + /* Restore the general purpose registers. */
> + mov x0, x9
Looks like this code is treating x9 as callee saved over the kernel
call. While this is true with the current implementation of the
kernel, the glibc port for AArch64 currently treats only the argument
registers as preserved. This is a hang over from the early days of
the AArch64 port when the kernel guys wanted the glibc port to be
conservative in this respect in order that they have the opportunity
to be selective in what was restored on exit from the kernel.
Catalin, Can you comment on the above paragraph? Is it still
important that glibc / user space be conservative in its assumptions
about which registers are preserved over system call or can we now
relax this position and exploit the fact that the kernel preserves
x9-x30 over kernel calls?
> + cfi_def_cfa(x0, 0)
Space before (....
Cheers
/Marcus