]> git.proxmox.com Git - mirror_edk2.git/blob - 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
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 .586P
23 .model flat,C
24 .xmm
25 .code
26
27 ;------------------------------------------------------------------------------
28 ; VOID
29 ; AsmFxSave (
30 ; OUT IA32_FX_BUFFER *Buffer
31 ; );
32 ;------------------------------------------------------------------------------
33 AsmFxSave PROC
34 mov eax, [esp + 4]
35 fxsave [eax]
36 ret
37 AsmFxSave ENDP
38
39 ;------------------------------------------------------------------------------
40 ; VOID
41 ; AsmFxRestore (
42 ; IN CONST IA32_FX_BUFFER *Buffer
43 ; );
44 ;------------------------------------------------------------------------------
45 AsmFxRestore PROC
46 mov eax, [esp + 4]
47 fxrstor [eax]
48 ret
49 AsmFxRestore ENDP
50
51 ;------------------------------------------------------------------------------
52 ; UINTN
53 ; AsmGetEflags (
54 ; VOID
55 ; );
56 ;------------------------------------------------------------------------------
57 AsmGetEflags PROC
58 pushfd
59 pop eax
60 ret
61 AsmGetEflags ENDP
62
63 ;------------------------------------------------------------------------------
64 ; VOID
65 ; AsmSetEflags (
66 ; IN UINTN Eflags
67 ; );
68 ;------------------------------------------------------------------------------
69 AsmSetEflags PROC
70 push [esp + 4]
71 popfd
72 ret
73 AsmSetEflags ENDP
74
75 END