]>
Commit | Line | Data |
---|---|---|
2b53e394 HT |
1 | #*****************************************************************************\r |
2 | #*\r | |
3 | #* Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r | |
4 | #* This program and the accompanying materials \r | |
5 | #* are licensed and made available under the terms and conditions of the BSD License \r | |
6 | #* which accompanies this distribution. The full text of the license may be found at \r | |
7 | #* http://opensource.org/licenses/bsd-license.php \r | |
8 | #* \r | |
9 | #* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | #* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | #* \r | |
12 | #* Module Name:\r | |
13 | #*\r | |
14 | #* Fx.S\r | |
15 | #* \r | |
16 | #* Abstract:\r | |
17 | #* \r | |
18 | #* AsmFxRestore and AsmFxSave function\r | |
19 | #* \r | |
20 | #*****************************************************************************\r | |
21 | #include <EfiBind.h>\r | |
22 | \r | |
23 | .globl ASM_PFX(AsmFxSave)\r | |
24 | .globl ASM_PFX(AsmFxRestore)\r | |
25 | \r | |
26 | .text\r | |
27 | \r | |
28 | #------------------------------------------------------------------------------\r | |
29 | # VOID\r | |
30 | # AsmFxSave (\r | |
31 | # OUT IA32_FX_BUFFER *Buffer\r | |
32 | # );\r | |
33 | #------------------------------------------------------------------------------\r | |
34 | ASM_PFX(AsmFxSave):\r | |
35 | fxsave (%rcx)\r | |
36 | retq\r | |
37 | \r | |
38 | #------------------------------------------------------------------------------\r | |
39 | # VOID\r | |
40 | # AsmFxRestore (\r | |
41 | # IN CONST IA32_FX_BUFFER *Buffer\r | |
42 | # );\r | |
43 | #------------------------------------------------------------------------------\r | |
44 | ASM_PFX(AsmFxRestore):\r | |
45 | fxrstor (%rcx)\r | |
46 | retq\r | |
47 | \r | |
3e99020d LG |
48 | #------------------------------------------------------------------------------\r |
49 | # UINTN\r | |
50 | # AsmGetEflags (\r | |
51 | # VOID\r | |
52 | # );\r | |
53 | #------------------------------------------------------------------------------\r | |
54 | ASM_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 | |
66 | ASM_PFX(AsmSetEflags):\r | |
67 | pushq %rcx\r | |
68 | popfq\r | |
69 | ret\r | |
70 | #AsmSetEflags ENDP\r |