On 19 July 2014 02:57, <[email protected]> wrote:

> would it make sense to save and restore the two registers
> on syscall entry/exit, so userspace programs could make use
> of them for per process data?
>

Good question. None of the others need to be saved and restored because
they are defined to be dead on entry to a function,
but you're right that rule doesn't really apply to extern register, and
they could be useful. _tos only works when every process has
at least one stack always at the same fixed virtual address. On the other
hand, a kernel that provides an alternative to that would
also know to save and restore extern registers.

Reply via email to