diff --git a/src/common/mathutil.h b/src/common/mathutil.h index bdf8c2a..d2aa5dd 100644 --- a/src/common/mathutil.h +++ b/src/common/mathutil.h @@ -21,6 +21,10 @@ #include "common/debug.h" #include "common/platform.h" +#if defined(__GNUC__) +#include +#endif + namespace angle { using base::CheckedNumeric; @@ -1260,6 +1264,12 @@ inline constexpr unsigned int UnsignedCeilDivide(unsigned int value, unsigned in # define ANGLE_ROTL64(x, y) _rotl64(x, y) # define ANGLE_ROTR16(x, y) _rotr16(x, y) +#elif defined(__GNUC__) + +# define ANGLE_ROTL(x, y) __rold(x, y) +# define ANGLE_ROTL64(x, y) __rolq(x, y) +# define ANGLE_ROTR16(x, y) __rolw(x, y) + #elif defined(__clang__) && __has_builtin(__builtin_rotateleft32) && \ __has_builtin(__builtin_rotateleft64) && __has_builtin(__builtin_rotateright16)