]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Fx.asm
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Thunk16 / Ia32 / Fx.asm
CommitLineData
3eb9473e 1;*****************************************************************************\r
2;*\r
3e99020d 3;* Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
4ea9375a 4;* This program and the accompanying materials \r
3eb9473e 5;* are licensed and made available under the terms and conditions of the BSD License \r
6;* which accompanies this distribution. The full text of the license may be found at \r
7;* http://opensource.org/licenses/bsd-license.php \r
8;* \r
9;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11;* \r
12;* Module Name:\r
13;*\r
14;* Fx.asm\r
15;* \r
16;* Abstract:\r
17;* \r
18;* AsmFxRestore and AsmFxSave function\r
19;* \r
20;*****************************************************************************\r
21\r
22 .586P\r
23 .model flat,C\r
24 .xmm\r
25 .code\r
26\r
27;------------------------------------------------------------------------------\r
28; VOID\r
29; AsmFxSave (\r
30; OUT IA32_FX_BUFFER *Buffer\r
31; );\r
32;------------------------------------------------------------------------------\r
33AsmFxSave PROC\r
34 mov eax, [esp + 4]\r
35 fxsave [eax]\r
36 ret\r
37AsmFxSave ENDP\r
38\r
39;------------------------------------------------------------------------------\r
40; VOID\r
41; AsmFxRestore (\r
42; IN CONST IA32_FX_BUFFER *Buffer\r
43; );\r
44;------------------------------------------------------------------------------\r
45AsmFxRestore PROC\r
46 mov eax, [esp + 4]\r
47 fxrstor [eax]\r
48 ret\r
49AsmFxRestore ENDP\r
50\r
3e99020d
LG
51;------------------------------------------------------------------------------\r
52; UINTN\r
53; AsmGetEflags (\r
54; VOID\r
55; );\r
56;------------------------------------------------------------------------------\r
57AsmGetEflags PROC\r
58 pushfd\r
59 pop eax\r
60 ret\r
61AsmGetEflags ENDP\r
62\r
63;------------------------------------------------------------------------------\r
64; VOID\r
65; AsmSetEflags (\r
66; IN UINTN Eflags\r
67; );\r
68;------------------------------------------------------------------------------\r
69AsmSetEflags PROC\r
70 push [esp + 4]\r
71 popfd\r
72 ret\r
73AsmSetEflags ENDP\r
74\r
3eb9473e 75 END\r