How to handle float-point operations

Arun KS getarunks at
Thu Jun 25 05:03:25 EDT 2015

Hello Mudongliang,

On Tue, Jun 23, 2015 at 9:01 AM, 慕冬亮 <mudongliangabcd at> wrote:
> I know there are rarely float-point operations! What's the exception?
> In the linux kernel, how does it handle the float-point operations in the userland?

Most of the userspace programs do not use FP instructions. So by
default floating point engine is turned off during a context switch.
When a process executes floating point instruction, an undefined
exception is generated. Exception handler enables the floating point
engine and jump back to the same instruction which caused the
exception so that it will get re executed with FP engine on.


>         - mudongliang
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at

More information about the Kernelnewbies mailing list