mirror of https://github.com/PCSX2/pcsx2.git
intrinsic: add rotate support for clang....
This commit is contained in:
parent
85f64b8c08
commit
d59e4ca4d1
|
@ -18,7 +18,12 @@
|
||||||
// Because nobody can't agree on a single name !
|
// Because nobody can't agree on a single name !
|
||||||
#if defined(__GNUG__)
|
#if defined(__GNUG__)
|
||||||
|
|
||||||
|
// Yes there are several files for the same features!
|
||||||
|
// x86intrin.h which is the general include provided by the compiler
|
||||||
|
// intrin_x86.h which is a compatibility layer (as this file) but with a BSD license
|
||||||
|
// x86_intrin.h, this file, which is another compatibility layer
|
||||||
#include "x86intrin.h"
|
#include "x86intrin.h"
|
||||||
|
#include "intrin_x86.h"
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -26,6 +31,19 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
// Seriously what is so complicated to provided this bunch of intrinsics in clangs.
|
||||||
|
static unsigned int _rotr(unsigned int x, int s)
|
||||||
|
{
|
||||||
|
return (x >> s) | (x << (32 - s));
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned int _rotl(unsigned int x, int s)
|
||||||
|
{
|
||||||
|
return (x << s) | (x >> (32 - s));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Not correctly defined in GCC4.8 and below ! (dunno for VS)
|
// Not correctly defined in GCC4.8 and below ! (dunno for VS)
|
||||||
#ifndef _MM_MK_INSERTPS_NDX
|
#ifndef _MM_MK_INSERTPS_NDX
|
||||||
#define _MM_MK_INSERTPS_NDX(srcField, dstField, zeroMask) (((srcField)<<6) | ((dstField)<<4) | (zeroMask))
|
#define _MM_MK_INSERTPS_NDX(srcField, dstField, zeroMask) (((srcField)<<6) | ((dstField)<<4) | (zeroMask))
|
||||||
|
|
Loading…
Reference in New Issue