floating points in kernel space

Dave Hylands dhylands at gmail.com
Tue Jan 4 10:44:12 EST 2011

Hi Mohit,

On Tue, Jan 4, 2011 at 4:43 AM, mohit verma <mohit89mlnc at gmail.com> wrote:
> hi all,
> i read somewhere that there is no floating point arithmatic supported in the
> kernel space . is it true??
> but the floating point registers and even floating point arithmatic units
> are all handled by the.........( kernel i think).

That is correct. In some architectures, attempts to use floating point
from the kernel will work. I've seen some x86 code that uses it.
However, with ARM for example, there is no float support in the
kernel, and some ARM architectures have no floating point support in
the hardware either. For ARM, there is a kernel implemented emulation
of the floating point instructions, but these can only be called from
user space. There are also some ARM software floating point libraries
(aka soft-fp) which can be used from user space (which are much more
efficient than using the kernel emulation library)

The kernel also doesn't support 64-bit division using the C divide
statement, unless you happen to be running on a 64-bit architecture.
There are some helper functions to achieve 64-bit division (see

Dave Hylands

More information about the Kernelnewbies mailing list