]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/ReadMm2.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ReadMm2.c
1 /** @file
2 AsmReadMm2 function
3
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9
10
11
12 /**
13 Reads the current value of 64-bit MMX Register #2 (MM2).
14
15 Reads and returns the current value of MM2. This function is only available
16 on IA-32 and x64.
17
18 @return The current value of MM2.
19
20 **/
21 UINT64
22 EFIAPI
23 AsmReadMm2 (
24 VOID
25 )
26 {
27 _asm {
28 push eax
29 push eax
30 movq [esp], mm2
31 pop eax
32 pop edx
33 emms
34 }
35 }
36