3 Copyright (c) 1998 Intel Corporation
22 // Declare runtime functions
27 #pragma RUNTIME_CODE(LShiftU64)
28 #pragma RUNTIME_CODE(RShiftU64)
29 #pragma RUNTIME_CODE(MultU64x32)
30 #pragma RUNTIME_CODE(DivU64x32)
46 // Left shift 64bit by 32bit and get a 64bit result
48 return Operand << Count;
56 // Right shift 64bit by 32bit and get a 64bit result
58 return Operand >> Count;
64 IN UINT64 Multiplicand,
67 // Multiple 64bit by 32bit and get a 64bit result
69 return Multiplicand * Multiplier;
76 OUT UINTN *Remainder OPTIONAL
78 // divide 64bit by 32bit and get a 64bit result
79 // N.B. only works for 31bit divisors!!
81 ASSERT (Divisor != 0);
84 *Remainder = Dividend % Divisor;
87 return Dividend / Divisor;