summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorJeremy Compostella <jeremy.compostella@intel.com>2024-10-09 15:03:13 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-10-17 13:32:42 +0000
commit866abb233817eb349fa5fe2b32283e990a8e5056 (patch)
tree48a33b86ef6cb941720758b5c110414e56bdf487 /MdeModulePkg
parent996e740cc83aa499d91b3ab3ae857dab7578e05c (diff)
downloadedk2-866abb233817eb349fa5fe2b32283e990a8e5056.tar.gz
edk2-866abb233817eb349fa5fe2b32283e990a8e5056.tar.bz2
edk2-866abb233817eb349fa5fe2b32283e990a8e5056.zip
MdeModulePkg: Replace right bit shift operator with RShiftU64
Instead of using bit shift operations, it is preferable to use BaseLib bit shift functions to prevent compilers from inserting intrinsics. Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/Pei/Memory/MemoryServices.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
index 65e3405e9c..562092df70 100644
--- a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
+++ b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
@@ -638,7 +638,7 @@ PeiAllocatePages (
// Verify that there is sufficient memory to satisfy the allocation.
//
RemainingMemory = (UINTN)(*FreeMemoryTop - *FreeMemoryBottom);
- RemainingPages = RemainingMemory >> EFI_PAGE_SHIFT;
+ RemainingPages = (UINTN)(RShiftU64 (RemainingMemory, EFI_PAGE_SHIFT));
//
// The number of remaining pages needs to be greater than or equal to that of
// the request pages. In addition, there should be enough space left to hold a