Index: source/lib/sysdep/arch/x86_x64/topology.cpp =================================================================== --- source/lib/sysdep/arch/x86_x64/topology.cpp +++ source/lib/sysdep/arch/x86_x64/topology.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -101,6 +101,15 @@ DEBUG_WARN_ERR(ERR::CPU_FEATURE_MISSING); const size_t logicalPerPackage = bits(regs.ebx, 16, 23); const size_t maxCoresPerPackage = MaxCoresPerPackage(); +#if GCC_VERSION && defined(__i386__) && defined(__PIC__) + // Intel multi-core systems without HT falsely set the HT bit + // its confused inline asm in x86_x64::__cpuid() for GCC+i386+PIC + if(logicalPerPackage % maxCoresPerPackage && x86_x64::Vendor() == x86_x64::VENDOR_INTEL) + { + + return 1; + } +#endif // cores ought to be uniform WRT # logical processors ENSURE(logicalPerPackage % maxCoresPerPackage == 0); const size_t maxLogicalPerCore = logicalPerPackage / maxCoresPerPackage;