]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
2 | IA-32/x64 AsmFxRestore()\r | |
3 | \r | |
2054fd13 | 4 | Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
e1f414b6 | 6 | \r |
e1f414b6 | 7 | **/\r |
8 | \r | |
e1f414b6 | 9 | #include "BaseLibInternals.h"\r |
10 | \r | |
11 | /**\r | |
12 | Restores the current floating point/SSE/SSE2 context from a buffer.\r | |
13 | \r | |
14 | Restores the current floating point/SSE/SSE2 state from the buffer specified\r | |
15 | by Buffer. Buffer must be aligned on a 16-byte boundary. This function is\r | |
030cd1a2 | 16 | only available on IA-32 and x64.\r |
e1f414b6 | 17 | \r |
18 | If Buffer is NULL, then ASSERT().\r | |
19 | If Buffer is not aligned on a 16-byte boundary, then ASSERT().\r | |
20 | If Buffer was not saved with AsmFxSave(), then ASSERT().\r | |
21 | \r | |
127010dd | 22 | @param Buffer A pointer to a buffer to save the floating point/SSE/SSE2 context.\r |
e1f414b6 | 23 | \r |
24 | **/\r | |
25 | VOID\r | |
26 | EFIAPI\r | |
27 | AsmFxRestore (\r | |
2f88bd3a | 28 | IN CONST IA32_FX_BUFFER *Buffer\r |
e1f414b6 | 29 | )\r |
30 | {\r | |
31 | ASSERT (Buffer != NULL);\r | |
38bbd3d9 | 32 | ASSERT (0 == ((UINTN)Buffer & 0xf));\r |
e1f414b6 | 33 | \r |
34 | //\r | |
35 | // Check the flag recorded by AsmFxSave()\r | |
36 | //\r | |
2f88bd3a | 37 | ASSERT (0xAA5555AA == *(UINT32 *)(&Buffer->Buffer[sizeof (Buffer->Buffer) - 4]));\r |
e1f414b6 | 38 | \r |
39 | InternalX86FxRestore (Buffer);\r | |
40 | }\r |