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   RShiftU64.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. This high bits are
27   filled with zeros. 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 zero. 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 >> Count
38 
39 **/
40 UINT64
41 EFIAPI
GlueRShiftU64(IN UINT64 Operand,IN UINTN Count)42 GlueRShiftU64 (
43   IN      UINT64                    Operand,
44   IN      UINTN                     Count
45   )
46 {
47   ASSERT (Count < sizeof (Operand) * 8);
48   return InternalMathRShiftU64 (Operand, Count);
49 }
50