]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/XGetBv.nasm
MdePkg/BaseLib: Add support for the XGETBV instruction
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / XGetBv.nasm
diff --git a/MdePkg/Library/BaseLib/Ia32/XGetBv.nasm b/MdePkg/Library/BaseLib/Ia32/XGetBv.nasm
new file mode 100644 (file)
index 0000000..9f7b03b
--- /dev/null
@@ -0,0 +1,31 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>\r
+; SPDX-License-Identifier: BSD-2-Clause-Patent\r
+;\r
+; Module Name:\r
+;\r
+;   XGetBv.Asm\r
+;\r
+; Abstract:\r
+;\r
+;   AsmXgetBv function\r
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    SECTION .text\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT64\r
+; EFIAPI\r
+; AsmXGetBv (\r
+;   IN UINT32  Index\r
+;   );\r
+;------------------------------------------------------------------------------\r
+global ASM_PFX(AsmXGetBv)\r
+ASM_PFX(AsmXGetBv):\r
+    mov     ecx, [esp + 4]\r
+    xgetbv\r
+    ret\r