]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Thunk16 / X64 / Fx.S
1 #*****************************************************************************
2 #*
3 #* Copyright (c) 2008, 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.S
15 #*
16 #* Abstract:
17 #*
18 #* AsmFxRestore and AsmFxSave function
19 #*
20 #*****************************************************************************
21 #include <EfiBind.h>
22
23 .globl ASM_PFX(AsmFxSave)
24 .globl ASM_PFX(AsmFxRestore)
25
26 .text
27
28 #------------------------------------------------------------------------------
29 # VOID
30 # AsmFxSave (
31 # OUT IA32_FX_BUFFER *Buffer
32 # );
33 #------------------------------------------------------------------------------
34 ASM_PFX(AsmFxSave):
35 fxsave (%rcx)
36 retq
37
38 #------------------------------------------------------------------------------
39 # VOID
40 # AsmFxRestore (
41 # IN CONST IA32_FX_BUFFER *Buffer
42 # );
43 #------------------------------------------------------------------------------
44 ASM_PFX(AsmFxRestore):
45 fxrstor (%rcx)
46 retq
47
48 #------------------------------------------------------------------------------
49 # UINTN
50 # AsmGetEflags (
51 # VOID
52 # );
53 #------------------------------------------------------------------------------
54 ASM_PFX(AsmGetEflags):
55 pushfq
56 popq %rax
57 ret
58 #AsmGetEflags ENDP
59
60 #------------------------------------------------------------------------------
61 # VOID
62 # AsmSetEflags (
63 # IN UINTN Eflags
64 # );
65 #------------------------------------------------------------------------------
66 ASM_PFX(AsmSetEflags):
67 pushq %rcx
68 popfq
69 ret
70 #AsmSetEflags ENDP