]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/LShiftU64.nasm
MdePkg: Replace Opcode with the corresponding instructions.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / LShiftU64.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
5 ;
6 ; Module Name:
7 ;
8 ; LShiftU64.nasm
9 ;
10 ; Abstract:
11 ;
12 ; 64-bit left shift function for IA-32
13 ;
14 ;------------------------------------------------------------------------------
15
16 SECTION .text
17
18 ;------------------------------------------------------------------------------
19 ; UINT64
20 ; EFIAPI
21 ; InternalMathLShiftU64 (
22 ; IN UINT64 Operand,
23 ; IN UINTN Count
24 ; );
25 ;------------------------------------------------------------------------------
26 global ASM_PFX(InternalMathLShiftU64)
27 ASM_PFX(InternalMathLShiftU64):
28 mov cl, [esp + 12]
29 xor eax, eax
30 mov edx, [esp + 4]
31 test cl, 32 ; Count >= 32?
32 jnz .0
33 mov eax, edx
34 mov edx, [esp + 8]
35 .0:
36 shld edx, eax, cl
37 shl eax, cl
38 ret
39