1;***************************************************************************** 2;* 3;* Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 4;* This program and the accompanying materials 5;* are licensed and made available under the terms and conditions of the BSD License 6;* which accompanies this distribution. The full text of the license may be found at 7;* http://opensource.org/licenses/bsd-license.php 8;* 9;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11;* 12;* Module Name: 13;* 14;* Fx.asm 15;* 16;* Abstract: 17;* 18;* AsmFxRestore and AsmFxSave function 19;* 20;***************************************************************************** 21 22 .code 23 24;------------------------------------------------------------------------------ 25; VOID 26; AsmFxSave ( 27; OUT IA32_FX_BUFFER *Buffer 28; ); 29;------------------------------------------------------------------------------ 30AsmFxSave PROC 31 fxsave [rcx] 32 ret 33AsmFxSave ENDP 34 35;------------------------------------------------------------------------------ 36; VOID 37; AsmFxRestore ( 38; IN CONST IA32_FX_BUFFER *Buffer 39; ); 40;------------------------------------------------------------------------------ 41AsmFxRestore PROC 42 fxrstor [rcx] 43 ret 44AsmFxRestore ENDP 45 46;------------------------------------------------------------------------------ 47; UINTN 48; AsmGetEflags ( 49; VOID 50; ); 51;------------------------------------------------------------------------------ 52AsmGetEflags PROC 53 pushfq 54 pop rax 55 ret 56AsmGetEflags ENDP 57 58;------------------------------------------------------------------------------ 59; VOID 60; AsmSetEflags ( 61; IN UINTN Eflags 62; ); 63;------------------------------------------------------------------------------ 64AsmSetEflags PROC 65 push rcx 66 popfq 67 ret 68AsmSetEflags ENDP 69 70 END 71