]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/ARShiftU64.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / ARShiftU64.c
1 /*++
2
3 Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14
15 ARShiftU64.c
16
17 Abstract:
18
19 Math worker functions.
20
21 --*/
22
23 #include "BaseLibInternals.h"
24
25 /**
26 Shifts a 64-bit integer right between 0 and 63 bits. The high bits are filled
27 with original integer's bit 63. The shifted value is returned.
28
29 This function shifts the 64-bit value Operand to the right by Count bits. The
30 high Count bits are set to bit 63 of Operand. The shifted value is returned.
31
32 If Count is greater than 63, then ASSERT().
33
34 @param Operand The 64-bit operand to shift right.
35 @param Count The number of bits to shift right.
36
37 @return Operand arithmetically shifted right by Count
38
39 **/
40 UINT64
41 EFIAPI
42 ARShiftU64 (
43 IN UINT64 Operand,
44 IN UINTN Count
45 )
46 {
47 ASSERT (Count < sizeof (Operand) * 8);
48 return InternalMathARShiftU64 (Operand, Count);
49 }