mirror of
https://github.com/dolphin-emu/hwtests.git
synced 2026-01-31 01:05:17 +01:00
22 lines
326 B
C
22 lines
326 B
C
#pragma once
|
|
|
|
#include <gctypes.h>
|
|
|
|
#ifndef _rotl
|
|
static inline u32 _rotl(u32 x, int shift)
|
|
{
|
|
shift &= 31;
|
|
if (!shift)
|
|
return x;
|
|
return (x << shift) | (x >> (32 - shift));
|
|
}
|
|
|
|
static inline u32 _rotr(u32 x, int shift)
|
|
{
|
|
shift &= 31;
|
|
if (!shift)
|
|
return x;
|
|
return (x >> shift) | (x << (32 - shift));
|
|
}
|
|
#endif
|