]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.asm
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ia32 / LShiftU64.asm
1 ; Copyright (c) 2004, Intel Corporation
2 ; All rights reserved. This program and the accompanying materials
3 ; are licensed and made available under the terms and conditions of the BSD License
4 ; which accompanies this distribution. The full text of the license may be found at
5 ; http://opensource.org/licenses/bsd-license.php
6 ;
7 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
8 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
9 ;
10 ; Module Name:
11 ;
12 ; LShiftU64.asm
13 ;
14 ; Abstract:
15 ;
16 ; 64-bit left shift function for IA-32
17 ;
18 ;------------------------------------------------------------------------------
19
20 .686
21 .model flat,C
22 .code
23
24 ;------------------------------------------------------------------------------
25 ; UINT64
26 ; EFIAPI
27 ; InternalMathLShiftU64 (
28 ; IN UINT64 Operand,
29 ; IN UINTN Count
30 ; );
31 ;------------------------------------------------------------------------------
32 InternalMathLShiftU64 PROC
33 mov cl, [esp + 12]
34 xor eax, eax
35 mov edx, [esp + 4]
36 test cl, 32 ; Count >= 32?
37 cmovz eax, edx
38 cmovz edx, [esp + 8]
39 shld edx, eax, cl
40 shl eax, cl
41 ret
42 InternalMathLShiftU64 ENDP
43
44 END