]> git.proxmox.com Git - mirror_edk2.git/blame - 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
CommitLineData
e8de4680
A
1#*****************************************************************************
2#*
4ea9375a
HT
3#* Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
4#* This program and the accompanying materials
e8de4680
A
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#------------------------------------------------------------------------------
34ASM_PFX(AsmFxSave):
35 fxsave (%rcx)
36 retq
37
38#------------------------------------------------------------------------------
39# VOID
40# AsmFxRestore (
41# IN CONST IA32_FX_BUFFER *Buffer
42# );
43#------------------------------------------------------------------------------
e8de4680
A
44ASM_PFX(AsmFxRestore):
45 fxrstor (%rcx)
46 retq
3e99020d
LG
47
48#------------------------------------------------------------------------------\r
49# UINTN\r
50# AsmGetEflags (\r
51# VOID\r
52# );\r
53#------------------------------------------------------------------------------\r
54ASM_PFX(AsmGetEflags):\r
55 pushfq\r
56 popq %rax\r
57 ret\r
58#AsmGetEflags ENDP\r
59\r
60#------------------------------------------------------------------------------\r
61# VOID\r
62# AsmSetEflags (\r
63# IN UINTN Eflags\r
64# );\r
65#------------------------------------------------------------------------------\r
66ASM_PFX(AsmSetEflags):\r
67 pushq %rcx\r
68 popfq\r
69 ret\r
70#AsmSetEflags ENDP\r