]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Fx.S
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Thunk16 / Ia32 / Fx.S
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 #include <EfiBind.h>
21 #------------------------------------------------------------------------------
22
23 .586P:
24 #.MODEL flat,C
25 .xmm:
26 .code:
27 #------------------------------------------------------------------------------
28 .globl ASM_PFX(AsmFxSave)
29 .globl ASM_PFX(AsmFxRestore)
30 #------------------------------------------------------------------------------
31 # VOID
32 # AsmFxSave (
33 # OUT IA32_FX_BUFFER *Buffer
34 # );
35 #------------------------------------------------------------------------------
36 ASM_PFX(AsmFxSave):
37 movl 4(%esp), %eax
38 fxsave (%eax)
39 ret
40 #AsmFxSave ENDP
41
42 #------------------------------------------------------------------------------
43 # VOID
44 # AsmFxRestore (
45 # IN CONST IA32_FX_BUFFER *Buffer
46 # );
47 #------------------------------------------------------------------------------
48 ASM_PFX(AsmFxRestore):
49 movl 4(%esp), %eax
50 fxrstor (%eax)
51 ret
52 #AsmFxRestore ENDP
53
54 #------------------------------------------------------------------------------
55 # UINTN
56 # AsmGetEflags (
57 # VOID
58 # );
59 #------------------------------------------------------------------------------
60 ASM_PFX(AsmGetEflags):
61 pushfl
62 pop %eax
63 ret
64 #AsmGetEflags ENDP
65
66 #------------------------------------------------------------------------------
67 # VOID
68 # AsmSetEflags (
69 # IN UINTN Eflags
70 # );
71 #------------------------------------------------------------------------------
72 ASM_PFX(AsmSetEflags):
73 push 4(%esp)
74 popfl
75 ret
76 #AsmSetEflags ENDP