]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ia32/ReadEflags.c
MdePkg: Replace Opcode with the corresponding instructions.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ReadEflags.c
CommitLineData
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 19UINTN\r
20EFIAPI\r
21AsmReadEflags (\r
22 VOID\r
23 )\r
24{\r
25 __asm {\r
26 pushfd\r
27 pop eax\r
28 }\r
29}\r