mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-04 14:01:17 +12:00
Misc. Linux improvements and bug fixes. (#121)
Co-authored-by: Tom Lally <tomlally@protonmail.com>
This commit is contained in:
parent
b8d4cf5b29
commit
d3a7b3b5a6
23 changed files with 101 additions and 104 deletions
|
@ -228,11 +228,39 @@ typedef union _LARGE_INTEGER {
|
|||
#if defined(_MSC_VER)
|
||||
#define DLLEXPORT __declspec(dllexport)
|
||||
#elif defined(__GNUC__)
|
||||
#define DLLEXPORT __attribute__((dllexport))
|
||||
#if BOOST_OS_WINDOWS
|
||||
#define DLLEXPORT __attribute__((dllexport))
|
||||
#else
|
||||
#define DLLEXPORT
|
||||
#endif
|
||||
#else
|
||||
#error No definition for DLLEXPORT
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <cpuid.h>
|
||||
#endif
|
||||
|
||||
inline void cpuid(int cpuInfo[4], int functionId) {
|
||||
#if defined(_MSC_VER)
|
||||
__cpuid(cpuInfo, functionId);
|
||||
#elif defined(__GNUC__)
|
||||
__cpuid(functionId, cpuInfo[0], cpuInfo[1], cpuInfo[2], cpuInfo[3]);
|
||||
#else
|
||||
#error No definition for cpuid
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void cpuidex(int cpuInfo[4], int functionId, int subFunctionId) {
|
||||
#if defined(_MSC_VER)
|
||||
__cpuidex(cpuInfo, functionId, subFunctionId);
|
||||
#elif defined(__GNUC__)
|
||||
__cpuid_count(functionId, subFunctionId, cpuInfo[0], cpuInfo[1], cpuInfo[2], cpuInfo[3]);
|
||||
#else
|
||||
#error No definition for cpuidex
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// MEMPTR
|
||||
#include "Common/MemPtr.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue