]>
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 | |
1efcc4ae | 9 | \r |
f734a10a | 10 | \r |
e1f414b6 | 11 | \r |
12 | #include "BaseLibInternals.h"\r | |
13 | \r | |
14 | /**\r | |
15 | Restores the current floating point/SSE/SSE2 context from a buffer.\r | |
16 | \r | |
17 | Restores the current floating point/SSE/SSE2 state from the buffer specified\r | |
18 | by Buffer. Buffer must be aligned on a 16-byte boundary. This function is\r | |
030cd1a2 | 19 | only available on IA-32 and x64.\r |
e1f414b6 | 20 | \r |
21 | If Buffer is NULL, then ASSERT().\r | |
22 | If Buffer is not aligned on a 16-byte boundary, then ASSERT().\r | |
23 | If Buffer was not saved with AsmFxSave(), then ASSERT().\r | |
24 | \r | |
127010dd | 25 | @param Buffer A pointer to a buffer to save the floating point/SSE/SSE2 context.\r |
e1f414b6 | 26 | \r |
27 | **/\r | |
28 | VOID\r | |
29 | EFIAPI\r | |
30 | AsmFxRestore (\r | |
2fc60b70 | 31 | IN CONST IA32_FX_BUFFER *Buffer\r |
e1f414b6 | 32 | )\r |
33 | {\r | |
34 | ASSERT (Buffer != NULL);\r | |
38bbd3d9 | 35 | ASSERT (0 == ((UINTN)Buffer & 0xf));\r |
e1f414b6 | 36 | \r |
37 | //\r | |
38 | // Check the flag recorded by AsmFxSave()\r | |
39 | //\r | |
2054fd13 | 40 | ASSERT (0xAA5555AA == *(UINT32 *) (&Buffer->Buffer[sizeof (Buffer->Buffer) - 4]));\r |
e1f414b6 | 41 | \r |
42 | InternalX86FxRestore (Buffer);\r | |
43 | }\r |