3 ms·
> Kernel code is normally prohibited from using floating-point (FP) registers or instructions, including the C float and double data types. This rule reduces sy
by cwillu 3y ago
> Kernel code is normally prohibited from using floating-point (FP) registers or instructions, including the C float and double data types. This rule reduces system call overhead, because the kernel does not need to save and restore the userspace floating-point register state.
> However, occasionally drivers or library functions may need to include FP code. This is supported by isolating the functions containing FP code to a separate translation unit (a separate source file), and saving/restoring the FP register state around calls to those functions. This creates “critical sections” of floating-point usage.
https://www.kernel.org/doc/html/next/core-api/floating-point.html https://www.kernel.org/doc/html/next/core-api/floating-point...