]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/ReadDr4.nasm
MdePkg: Replace Opcode with the corresponding instructions.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ReadDr4.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
5 ;
6 ; Module Name:
7 ;
8 ; ReadDr4.Asm
9 ;
10 ; Abstract:
11 ;
12 ; AsmReadDr4 function
13 ;
14 ; Notes:
15 ;
16 ;------------------------------------------------------------------------------
17
18 SECTION .text
19
20 ;------------------------------------------------------------------------------
21 ; UINTN
22 ; EFIAPI
23 ; AsmReadDr4 (
24 ; VOID
25 ; );
26 ;------------------------------------------------------------------------------
27 global ASM_PFX(AsmReadDr4)
28 ASM_PFX(AsmReadDr4):
29 ;
30 ; DR4 is alias to DR6 only if DE (in CR4) is cleared. Otherwise, reading
31 ; this register will cause a #UD exception.
32 ;
33 ; MS assembler doesn't support this instruction since no one would use it
34 ; under normal circustances.
35 ;
36 mov eax, dr4
37 ret
38