site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On Apr 26, 2010, at 10:31 AM, Terry Lambert wrote:
On Apr 26, 2010, at 8:49 AM, Duane Murphy <duanemurphy@mac.com> wrote:
-----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?
By doing them in user space?
Why does your code need to run in protected mode?
We would like to use the new AES-NI instructions in the kernel. The AES-NI instructions use the xmm registers, hence the need to save and restore FP state. ...Duane -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.10.0 (Build 500) Charset: US-ASCII wsBVAwUBS9XdAErg9acQ4r2CAQjdWQf+OhZRY8sINZra8nS0mSwWqZ6kTQaSe9Nv 5l1dX8HpODLVdmn6NcKKAqmxWAElDUMwCwWbndTeTNHdM9LLAimka5KOO44gYrOH 0hKIlb6mYLS0F6MXFrw2DHo3/yWVm9XNVCy8Qqnu69X7FQSdHyEY3cvxALYo4LjU sbZeb1gn8ab0JthUEfjVLhqXUbm1lzmqos5pJKk/YTCwbMu7/Lq5AgaNyEhraU2z EpfOEnYxgJSJghnfanXc1bXSzFFN1cSescjja8DZUidVmeTj1MsHHfJeVGZf5zZ3 7rr9byUX05acWz5f6fSTAnE8LzHoTIpBePP6sg9JAOcHkIA4h1tgHQ== =31Wj -----END PGP SIGNATURE----- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com