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