> Regarding the latter, Plan 9 does not allow floating point
> instructions to be executed within note handling, but erring on the
> side of caution also forbids instructions such as MOVOU (don't ask me)
> which is part of the SSE(2?) extension, but hardly qualifies as a
> floating point instruction.

The reason for FP being forbidden in note handler is that the kernel only saves
the general purpose (Ureg) registers of the interrupted/notified process
context. The fp or xmm registers are *not* saved and a note handler modifying
those (thru fp instructions or sse instructions) would trash these registers
for the program interrupted by the note.

you could save the ureg, and jump out of the note handler with notejmp(),
save the fp/sse registers yourself and then do the handling of the note
outside of the note context. (this is how signals are implemented in ape).

or we change the kernel to save the fp registers in notify() as well,
pushing them on the user stack and restoring them on noted() just like
the Ureg.

or GO could just stop using *OMG-OPTIMIZED* SSE memmove() in the note
handler.

--
cinap

Reply via email to