[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] Detecting use of floating point

From: tim
Subject: Re: [Lightning] Detecting use of floating point
Date: Sat, 23 Feb 2008 16:35:48 +1100

For X86, the TS bit of CR0 (X86), if on ,forces a fault if FP is used.
It is set by a hardware context switch and reset by a privileged

The EM bit may also be useful.

The OS formally does this for you. If you are writing the OS, you woudl
have the authority to MOV into CR0.

Some CPUs have this facility and others do not.

Tim Josling

On Fri, 2008-02-22 at 17:12 -0500, Sandro Magi wrote:
> Is there any way to detect a change in floating point state? The
> floating point state tends to be expensive to save and restore, so if
> there's some sort of status flag that I can clear on context switch,
> and check on the next context switch to indicate whether floating
> point state has changed, it would save a significant amount of context
> switch time.
> Sandro
> _______________________________________________
> Lightning mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]