]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.asm
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Thunk16 / X64 / 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 .code
23
24 ;------------------------------------------------------------------------------
25 ; VOID
26 ; AsmFxSave (
27 ; OUT IA32_FX_BUFFER *Buffer
28 ; );
29 ;------------------------------------------------------------------------------
30 AsmFxSave PROC
31 fxsave [rcx]
32 ret
33 AsmFxSave ENDP
34
35 ;------------------------------------------------------------------------------
36 ; VOID
37 ; AsmFxRestore (
38 ; IN CONST IA32_FX_BUFFER *Buffer
39 ; );
40 ;------------------------------------------------------------------------------
41 AsmFxRestore PROC
42 fxrstor [rcx]
43 ret
44 AsmFxRestore ENDP
45
46 ;------------------------------------------------------------------------------
47 ; UINTN
48 ; AsmGetEflags (
49 ; VOID
50 ; );
51 ;------------------------------------------------------------------------------
52 AsmGetEflags PROC
53 pushfq
54 pop rax
55 ret
56 AsmGetEflags ENDP
57
58 ;------------------------------------------------------------------------------
59 ; VOID
60 ; AsmSetEflags (
61 ; IN UINTN Eflags
62 ; );
63 ;------------------------------------------------------------------------------
64 AsmSetEflags PROC
65 push rcx
66 popfq
67 ret
68 AsmSetEflags ENDP
69
70 END