]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/X86FxSave.c
4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include "BaseLibInternals.h"
12 Save the current floating point/SSE/SSE2 context to a buffer.
14 Saves the current floating point/SSE/SSE2 state to the buffer specified by
15 Buffer. Buffer must be aligned on a 16-byte boundary. This function is only
16 available on IA-32 and x64.
18 If Buffer is NULL, then ASSERT().
19 If Buffer is not aligned on a 16-byte boundary, then ASSERT().
21 @param Buffer A pointer to a buffer to save the floating point/SSE/SSE2 context.
27 OUT IA32_FX_BUFFER
*Buffer
30 ASSERT (Buffer
!= NULL
);
31 ASSERT (0 == ((UINTN
)Buffer
& 0xf));
33 InternalX86FxSave (Buffer
);
36 // Mark one flag at end of Buffer, it will be check by AsmFxRestor()
38 *(UINT32
*)(&Buffer
->Buffer
[sizeof (Buffer
->Buffer
) - 4]) = 0xAA5555AA;