]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/X86FxSave.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseLib / X86FxSave.c
CommitLineData
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
e1f414b6 9#include "BaseLibInternals.h"\r
10\r
11/**\r
12 Save the current floating point/SSE/SSE2 context to a buffer.\r
13\r
14 Saves the current floating point/SSE/SSE2 state to the buffer specified by\r
15 Buffer. Buffer must be aligned on a 16-byte boundary. This function is only\r
030cd1a2 16 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\r
127010dd 21 @param Buffer A pointer to a buffer to save the floating point/SSE/SSE2 context.\r
e1f414b6 22\r
23**/\r
24VOID\r
25EFIAPI\r
26AsmFxSave (\r
2f88bd3a 27 OUT IA32_FX_BUFFER *Buffer\r
e1f414b6 28 )\r
29{\r
30 ASSERT (Buffer != NULL);\r
38bbd3d9 31 ASSERT (0 == ((UINTN)Buffer & 0xf));\r
e1f414b6 32\r
33 InternalX86FxSave (Buffer);\r
34\r
35 //\r
36 // Mark one flag at end of Buffer, it will be check by AsmFxRestor()\r
37 //\r
2f88bd3a 38 *(UINT32 *)(&Buffer->Buffer[sizeof (Buffer->Buffer) - 4]) = 0xAA5555AA;\r
e1f414b6 39}\r