From cd939241591e68f6452c7ffebdd402efa269a807 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 2 Oct 2016 18:49:20 +0200 Subject: [PATCH] Add a footnote that userspace programs can still use SSE Fixes #227 --- blog/post/11-returning-from-exceptions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blog/post/11-returning-from-exceptions.md b/blog/post/11-returning-from-exceptions.md index 07677d16..c250edc6 100644 --- a/blog/post/11-returning-from-exceptions.md +++ b/blog/post/11-returning-from-exceptions.md @@ -481,7 +481,9 @@ However, _we won't do it that way_. The problem is the large amount of memory re Fortunately, there exists an alternative solution. ### Disabling Multimedia Extensions -We just disable MMX, SSE, and all the other fancy multimedia extensions. This way, our exception handlers won't clobber the multimedia registers because they won't use them at all. +We just disable MMX, SSE, and all the other fancy multimedia extensions in our kernel[^fn-userspace-sse]. This way, our exception handlers won't clobber the multimedia registers because they won't use them at all. + +[^fn-userspace-sse]: Userspace programs will still be able to use the multimedia registers. This solution has its own disadvantages, of course. For example, it leads to slower kernel code because the compiler can't perform any auto-vectorization optimizations. But it's still the faster solution (since we save many memory accesses) and most kernels do it this way (including Linux).