]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/X64/XGetBv.nasm
MdePkg/BaseLib: Add support for the XGETBV instruction
[mirror_edk2.git] / MdePkg / Library / BaseLib / X64 / XGetBv.nasm
CommitLineData
9b3ca509
TL
1;------------------------------------------------------------------------------\r
2;\r
3; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>\r
4; SPDX-License-Identifier: BSD-2-Clause-Patent\r
5;\r
6; Module Name:\r
7;\r
8; XGetBv.Asm\r
9;\r
10; Abstract:\r
11;\r
12; AsmXgetBv function\r
13;\r
14; Notes:\r
15;\r
16;------------------------------------------------------------------------------\r
17\r
18 DEFAULT REL\r
19 SECTION .text\r
20\r
21;------------------------------------------------------------------------------\r
22; UINT64\r
23; EFIAPI\r
24; AsmXGetBv (\r
25; IN UINT32 Index\r
26; );\r
27;------------------------------------------------------------------------------\r
28global ASM_PFX(AsmXGetBv)\r
29ASM_PFX(AsmXGetBv):\r
30 xgetbv\r
31 shl rdx, 32\r
32 or rax, rdx\r
33 ret\r
34\r