From 3d898ebdf31471086eff623f394788d481f9ed60 Mon Sep 17 00:00:00 2001 From: joevt Date: Tue, 9 Apr 2024 02:50:39 -0700 Subject: [PATCH] poweropcodes: Cleanup power_rot_mask. Use U instead of UL. U will use the smallest size that can fit all the unsigned bytes. Since 0xFFFFFFFF fits in 32 bits, the 0xFFFFFFFFU is a uint32_t. --- cpu/ppc/poweropcodes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/ppc/poweropcodes.cpp b/cpu/ppc/poweropcodes.cpp index 4f0758b..a8d3430 100644 --- a/cpu/ppc/poweropcodes.cpp +++ b/cpu/ppc/poweropcodes.cpp @@ -39,8 +39,8 @@ inline void power_setsoov(uint32_t a, uint32_t b, uint32_t d) { /** mask generator for rotate and shift instructions (ยง 4.2.1.4 PowerpC PEM) */ static inline uint32_t power_rot_mask(unsigned rot_mb, unsigned rot_me) { - uint32_t m1 = 0xFFFFFFFFUL >> rot_mb; - uint32_t m2 = uint32_t(0xFFFFFFFFUL << (31 - rot_me)); + uint32_t m1 = 0xFFFFFFFFU >> rot_mb; + uint32_t m2 = 0xFFFFFFFFU << (31 - rot_me); return ((rot_mb <= rot_me) ? m2 & m1 : m1 | m2); }