From mboxrd@z Thu Jan 1 00:00:00 1970 From: luis@debethencourt.com (Luis de Bethencourt) Date: Wed, 1 Jul 2015 11:53:49 +0100 Subject: How to handle float-point operations In-Reply-To: References: Message-ID: <20150701105349.GA26760@turing> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, Jul 01, 2015 at 01:58:30PM +0530, priyaranjan wrote: > Hi Arun, > > > >On Thu, Jun 25, 2015 at 2:33 PM, Arun KS wrote: > >Hello Mudongliang, > > > > > > >On Tue, Jun 23, 2015 at 9:01 AM, ??? 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. > > > > Is this somehow related to the platform in which linux runs? If the FP > > operations are valid, then will that still generate the exception or it > > does a context switch, turns on FP engine and re-executed? > > Hi Priyaranjan, Your email got mangled. Please don't send HTML attachments in your emails to the Linux Kernel mailing lists. Try again to reply to Arun. Thanks, Luis