1 year ago
#75612
loaded_dypper
Why cpuid returns the wrong answer?
When I run this I get that my system is 32-bit but I am running an Intel 7700k cpu which is a 64-bit even in control panel it says the windows arch is 64bit
#include <iostream>
#include <intrin.h>
using namespace std;
bool check_cpu()
{
int CPUINFO[4] = {0};
__cpuid(CPUINFO,0);
bool b64 = (CPUINFO[3] & 0x20000000 ) || false;
if (b64)
{
cout << "System is 64bit "<< endl;
return b64;
}
else
{
cout << "System is 32bit "<< endl;
return b64;
}
}
int main()
{
check_cpu();
return 0;
}
what am I doing wrong here
c++
cpuid
0 Answers
Your Answer