mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 22:41:18 +12:00
Moved _umul128 to precompiled.h
This commit is contained in:
parent
9810c36287
commit
ad1b38c3a9
2 changed files with 6 additions and 9 deletions
|
@ -5,15 +5,6 @@
|
||||||
#include "util/helpers/fspinlock.h"
|
#include "util/helpers/fspinlock.h"
|
||||||
#include "util/highresolutiontimer/HighResolutionTimer.h"
|
#include "util/highresolutiontimer/HighResolutionTimer.h"
|
||||||
|
|
||||||
#if BOOST_OS_LINUX || BOOST_OS_MACOS
|
|
||||||
static __inline__
|
|
||||||
uint64 _umul128(uint64 multiplier, uint64 multiplicand, uint64 *highProduct) {
|
|
||||||
unsigned __int128 x = (unsigned __int128)multiplier * (unsigned __int128)multiplicand;
|
|
||||||
*highProduct = (x >> 64);
|
|
||||||
return x & 0xFFFFFFFFFFFFFFFF;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint64 _rdtscLastMeasure = 0;
|
uint64 _rdtscLastMeasure = 0;
|
||||||
uint64 _rdtscFrequency = 0;
|
uint64 _rdtscFrequency = 0;
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,12 @@ inline uint64 _rotr64 (uint64 x, sint8 r)
|
||||||
return (x >> r) | (x << (64 - r));
|
return (x >> r) | (x << (64 - r));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline uint64 _umul128(uint64 multiplier, uint64 multiplicand, uint64 *highProduct) {
|
||||||
|
unsigned __int128 x = (unsigned __int128)multiplier * (unsigned __int128)multiplicand;
|
||||||
|
*highProduct = (x >> 64);
|
||||||
|
return x & 0xFFFFFFFFFFFFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
typedef uint8_t BYTE;
|
typedef uint8_t BYTE;
|
||||||
typedef uint32_t DWORD;
|
typedef uint32_t DWORD;
|
||||||
typedef int32_t LONG;
|
typedef int32_t LONG;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue