Add comments to x64 machine detection script

This commit is contained in:
sfoslund 2021-09-17 14:34:48 -07:00
parent e8ec98a819
commit 2016fa8577

View file

@ -85,6 +85,9 @@ function IsX64Machine() {
system.log("Cpu type: " + cputype);
system.log("64-bit: " + cpu64);
// From machine.h
// CPU_TYPE_X86_64 = CPU_TYPE_X86 | CPU_ARCH_ABI64 = 0x010000007 = 16777223
// CPU_TYPE_X86 = 7
var result = machine == "amd64" || machine == "x86_64" || cputype == "16777223" || (cputype == "7" && cpu64 == "1");
system.log("IsX64Machine: " + result);
return result;