This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/4] aarch64: Re-implement setcontext without sigreturn syscall


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]