Fix compilation with nazarautils changes
This commit is contained in:
parent
f2bc00d2ea
commit
a3f7c437f4
|
|
@ -14,14 +14,14 @@ namespace Nz
|
||||||
#if (defined(NAZARA_COMPILER_CLANG) || defined(NAZARA_COMPILER_GCC) || defined(NAZARA_COMPILER_INTEL)) && !defined(NAZARA_PLATFORM_WEB)
|
#if (defined(NAZARA_COMPILER_CLANG) || defined(NAZARA_COMPILER_GCC) || defined(NAZARA_COMPILER_INTEL)) && !defined(NAZARA_PLATFORM_WEB)
|
||||||
// https://en.wikipedia.org/wiki/CPUID
|
// https://en.wikipedia.org/wiki/CPUID
|
||||||
asm volatile(
|
asm volatile(
|
||||||
#ifdef NAZARA_PLATFORM_x64
|
#ifdef NAZARA_ARCH_x86_64
|
||||||
"pushq %%rbx \n\t" // save %rbx
|
"pushq %%rbx \n\t" // save %rbx
|
||||||
#else
|
#else
|
||||||
"pushl %%ebx \n\t" // save %ebx
|
"pushl %%ebx \n\t" // save %ebx
|
||||||
#endif
|
#endif
|
||||||
"cpuid \n\t"
|
"cpuid \n\t"
|
||||||
"movl %%ebx ,%[ebx] \n\t" // write the result into output var
|
"movl %%ebx ,%[ebx] \n\t" // write the result into output var
|
||||||
#ifdef NAZARA_PLATFORM_x64
|
#ifdef NAZARA_ARCH_x86_64
|
||||||
"popq %%rbx \n\t"
|
"popq %%rbx \n\t"
|
||||||
#else
|
#else
|
||||||
"popl %%ebx \n\t"
|
"popl %%ebx \n\t"
|
||||||
|
|
@ -49,7 +49,7 @@ namespace Nz
|
||||||
|
|
||||||
bool HardwareInfoImpl::IsCpuidSupported()
|
bool HardwareInfoImpl::IsCpuidSupported()
|
||||||
{
|
{
|
||||||
#ifdef NAZARA_PLATFORM_x64
|
#ifdef NAZARA_ARCH_x86_64
|
||||||
return true; // cpuid is always supported on x64 arch
|
return true; // cpuid is always supported on x64 arch
|
||||||
#elif defined(NAZARA_PLATFORM_WEB)
|
#elif defined(NAZARA_PLATFORM_WEB)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -24,14 +24,14 @@ namespace Nz
|
||||||
#elif defined(NAZARA_COMPILER_CLANG) || defined(NAZARA_COMPILER_GCC) || defined(NAZARA_COMPILER_INTEL)
|
#elif defined(NAZARA_COMPILER_CLANG) || defined(NAZARA_COMPILER_GCC) || defined(NAZARA_COMPILER_INTEL)
|
||||||
// https://en.wikipedia.org/wiki/CPUID
|
// https://en.wikipedia.org/wiki/CPUID
|
||||||
asm volatile(
|
asm volatile(
|
||||||
#ifdef NAZARA_PLATFORM_x64
|
#ifdef NAZARA_ARCH_x86_64
|
||||||
"pushq %%rbx \n\t" // save %rbx
|
"pushq %%rbx \n\t" // save %rbx
|
||||||
#else
|
#else
|
||||||
"pushl %%ebx \n\t" // save %ebx
|
"pushl %%ebx \n\t" // save %ebx
|
||||||
#endif
|
#endif
|
||||||
"cpuid \n\t"
|
"cpuid \n\t"
|
||||||
"movl %%ebx ,%[ebx] \n\t" // write the result into output var
|
"movl %%ebx ,%[ebx] \n\t" // write the result into output var
|
||||||
#ifdef NAZARA_PLATFORM_x64
|
#ifdef NAZARA_ARCH_x86_64
|
||||||
"popq %%rbx \n\t"
|
"popq %%rbx \n\t"
|
||||||
#else
|
#else
|
||||||
"popl %%ebx \n\t"
|
"popl %%ebx \n\t"
|
||||||
|
|
@ -63,7 +63,7 @@ namespace Nz
|
||||||
|
|
||||||
bool HardwareInfoImpl::IsCpuidSupported()
|
bool HardwareInfoImpl::IsCpuidSupported()
|
||||||
{
|
{
|
||||||
#ifdef NAZARA_PLATFORM_x64
|
#ifdef NAZARA_ARCH_x86_64
|
||||||
return true; // cpuid is always supported on x64 arch
|
return true; // cpuid is always supported on x64 arch
|
||||||
#else
|
#else
|
||||||
#if defined(NAZARA_COMPILER_MSVC)
|
#if defined(NAZARA_COMPILER_MSVC)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue