]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ia32/ReadGs.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ReadGs.c
CommitLineData
e1f414b6 1/** @file\r
2 AsmReadGs 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
1efcc4ae 9\r
f734a10a 10\r
e1f414b6 11\r
42eedea9 12/**\r
13 Reads the current value of GS Data Segment Register (GS).\r
14\r
15 Reads and returns the current value of GS. This function is only available on\r
030cd1a2 16 IA-32 and x64.\r
42eedea9 17\r
18 @return The current value of GS.\r
19\r
20**/\r
e1f414b6 21UINT16\r
22EFIAPI\r
23AsmReadGs (\r
24 VOID\r
25 )\r
26{\r
27 __asm {\r
28 xor eax, eax\r
29 mov ax, gs\r
30 }\r
31}\r
32\r