mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-12 11:31:16 +00:00
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.
This commit is contained in:
parent
f45b7c47c8
commit
3d898ebdf3
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user