]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | IA-32/x64 AsmFxRestore()\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r | |
5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
6 | \r | |
7 | **/\r | |
8 | \r | |
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 | |
16 | only available on IA-32 and x64.\r | |
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 | |
22 | @param Buffer A pointer to a buffer to save the floating point/SSE/SSE2 context.\r | |
23 | \r | |
24 | **/\r | |
25 | VOID\r | |
26 | EFIAPI\r | |
27 | AsmFxRestore (\r | |
28 | IN CONST IA32_FX_BUFFER *Buffer\r | |
29 | )\r | |
30 | {\r | |
31 | ASSERT (Buffer != NULL);\r | |
32 | ASSERT (0 == ((UINTN)Buffer & 0xf));\r | |
33 | \r | |
34 | //\r | |
35 | // Check the flag recorded by AsmFxSave()\r | |
36 | //\r | |
37 | ASSERT (0xAA5555AA == *(UINT32 *)(&Buffer->Buffer[sizeof (Buffer->Buffer) - 4]));\r | |
38 | \r | |
39 | InternalX86FxRestore (Buffer);\r | |
40 | }\r |