]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
2 | IA-32/x64 AsmFxSave()\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 | Save the current floating point/SSE/SSE2 context to a buffer.\r | |
16 | \r | |
17 | Saves the current floating point/SSE/SSE2 state to the buffer specified by\r | |
18 | Buffer. Buffer must be aligned on a 16-byte boundary. This function is only\r | |
030cd1a2 | 19 | 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 | \r | |
127010dd | 24 | @param Buffer A pointer to a buffer to save the floating point/SSE/SSE2 context.\r |
e1f414b6 | 25 | \r |
26 | **/\r | |
27 | VOID\r | |
28 | EFIAPI\r | |
29 | AsmFxSave (\r | |
30 | OUT IA32_FX_BUFFER *Buffer\r | |
31 | )\r | |
32 | {\r | |
33 | ASSERT (Buffer != NULL);\r | |
38bbd3d9 | 34 | ASSERT (0 == ((UINTN)Buffer & 0xf));\r |
e1f414b6 | 35 | \r |
36 | InternalX86FxSave (Buffer);\r | |
37 | \r | |
38 | //\r | |
39 | // Mark one flag at end of Buffer, it will be check by AsmFxRestor()\r | |
40 | //\r | |
2054fd13 | 41 | *(UINT32 *) (&Buffer->Buffer[sizeof (Buffer->Buffer) - 4]) = 0xAA5555AA;\r |
e1f414b6 | 42 | }\r |