From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 19 Jul 2014 13:42:52 +0100 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=001a11c3f6ea5f104204fe8b3640 Subject: Re: [9fans] extern register Topicbox-Message-UUID: 068a7608-ead9-11e9-9d60-3106f5b1d025 --001a11c3f6ea5f104204fe8b3640 Content-Type: text/plain; charset=UTF-8 On 19 July 2014 02:57, 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. --001a11c3f6ea5f104204fe8b3640 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 19 July 2014 02:57, <cinap_lenrek@felloff.net> wr= ote:
would it make sens= e 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 th= ey could be useful. _tos only works when every process has
at least one stack always at the same fixed virt= ual address. On the other hand, a kernel that provides an alternative to th= at would
also know to save and restore exte= rn registers.
--001a11c3f6ea5f104204fe8b3640--