]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/ARShiftU64.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / ARShiftU64.c
CommitLineData
e1f414b6 1/** @file\r
2 Math worker functions.\r
3\r
127010dd 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
9344f092 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
e1f414b6 6\r
7**/\r
8\r
e1f414b6 9#include "BaseLibInternals.h"\r
10\r
11/**\r
12 Shifts a 64-bit integer right between 0 and 63 bits. The high bits are filled\r
127010dd 13 with the original integer's bit 63. The shifted value is returned.\r
e1f414b6 14\r
15 This function shifts the 64-bit value Operand to the right by Count bits. The\r
16 high Count bits are set to bit 63 of Operand. The shifted value is returned.\r
17\r
18 If Count is greater than 63, then ASSERT().\r
19\r
20 @param Operand The 64-bit operand to shift right.\r
21 @param Count The number of bits to shift right.\r
22\r
9aa049d9 23 @return Operand >> Count\r
e1f414b6 24\r
25**/\r
26UINT64\r
27EFIAPI\r
28ARShiftU64 (\r
29 IN UINT64 Operand,\r
30 IN UINTN Count\r
31 )\r
32{\r
5385a579 33 ASSERT (Count < 64);\r
e1f414b6 34 return InternalMathARShiftU64 (Operand, Count);\r
35}\r