]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Library/BaseLib/ARShiftU64.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Library / BaseLib / ARShiftU64.c
... / ...
CommitLineData
1/** @file\r
2 Math worker functions.\r
3\r
4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
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
13 with the original integer's bit 63. The shifted value is returned.\r
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
23 @return Operand >> Count\r
24\r
25**/\r
26UINT64\r
27EFIAPI\r
28ARShiftU64 (\r
29 IN UINT64 Operand,\r
30 IN UINTN Count\r
31 )\r
32{\r
33 ASSERT (Count < 64);\r
34 return InternalMathARShiftU64 (Operand, Count);\r
35}\r