]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
2 | AsmReadEflags function\r | |
3 | \r | |
bb817c56 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
e1f414b6 | 6 | \r |
7 | **/\r | |
8 | \r | |
42eedea9 | 9 | /**\r |
10 | Reads the current value of the EFLAGS register.\r | |
11 | \r | |
12 | Reads and returns the current value of the EFLAGS register. This function is\r | |
030cd1a2 | 13 | only available on IA-32 and x64. This returns a 32-bit value on IA-32 and a\r |
14 | 64-bit value on x64.\r | |
42eedea9 | 15 | \r |
030cd1a2 | 16 | @return EFLAGS on IA-32 or RFLAGS on x64.\r |
42eedea9 | 17 | \r |
18 | **/\r | |
e1f414b6 | 19 | UINTN\r |
20 | EFIAPI\r | |
21 | AsmReadEflags (\r | |
22 | VOID\r | |
23 | )\r | |
24 | {\r | |
25 | __asm {\r | |
26 | pushfd\r | |
27 | pop eax\r | |
28 | }\r | |
29 | }\r |