Kernel: Don't use MMX memcpy() in the kernel.

I just discovered the hard way that clobbering FPU/MMX/SSE registers in the
kernel makes things very confusing for userspace (and other kernel threads.)

Let's banish all of those things from the kernel to keep things simple.
This commit is contained in:
Andreas Kling 2019-04-22 17:13:18 +02:00
commit 6693cfb26a
Notes: sideshowbarker 2024-07-19 14:37:29 +09:00
3 changed files with 9 additions and 2 deletions

View file

@ -8,9 +8,10 @@ extern "C" {
void* memcpy(void* dest_ptr, const void* src_ptr, size_t n)
{
if (n >= 1024) {
#ifndef KERNEL
if (n >= 1024)
return mmx_memcpy(dest_ptr, src_ptr, n);
}
#endif
size_t dest = (size_t)dest_ptr;
size_t src = (size_t)src_ptr;