Re: Saving the Floating Point State
Re: Saving the Floating Point State
- Subject: Re: Saving the Floating Point State
- From: Duane Murphy <email@hidden>
- Date: Mon, 26 Apr 2010 08:49:12 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On Apr 26, 2010, at 8:35 AM, Michael Smith wrote:
>
> On Apr 25, 2010, at 7:02 PM, Quinn wrote:
>
>> At 13:40 -0700 23/4/10, Duane Murphy wrote:
>>> Does OS X/Darwin have a function for saving and restoring the
>>> state of the floating pointer registers?
>>
>> No. The Darwin model is that you should use the floating point
>> unit at will; the kernel will notice, trap, save the user's FP
>> state, clear the FP state, and continue running your code. At that
>> point the kernel knows that the FP unit contains kernel stuff, and
>> preserve it across kernel preemptions, and restores the user FP
>> state when the thread returns to user space.
>
>
> Note that this only applies to the use of FP resources in a user
> context, whereas I believe the OP was asking about the use of same
> in the kernel.
This is correct. We want to add a process that uses FP resources in
the kernel.
> Kernel code must not use FP resources.
Huh? That seems like an onerous restriction. Can someone please
explain this a little better?
There are some useful algorithms that take use floating point
registers. How might I take advantage of these algorithms?
...Duane
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.10.0 (Build 500)
Charset: US-ASCII
wsBVAwUBS9W2AErg9acQ4r2CAQiyfwf/Tt020uXHYNw0VA27ftKJOyOlJSFFSCjr
FY789YoIMuiP4kb6cETo7fM+iOWkCNAoQaIioC9WYCs5OYo/NIMalCNp4vV149XB
Z4W8rFA6KH0czKXAjC3x1iuR+T8HpeNXG22dQLN8E+OClX9UxXPg9G7AX4VSRd7D
scypb7REUCglLbrsbq0vM8ghrLfo+0IU8nugJNZqbnXzZ32f/c4nnxGOPiObeFIF
GM1W4BQhsWz4J9Sdg0DF4xomKAZYA7d/LmzQCuvXBonqMhBGBaxGxBNzefRy+1jN
0BAs7En6OisMG4SUjPQSTwrReKxqOuMoHjvBHKtXvaA8pLdYA+QI0g==
=blSK
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden