On Fri, 15 Aug 2025 02:47:01 +1200 "[email protected]" 
<[email protected]> wrote:

> > In principle this sort of thing should be OK.  But maybe __BMI1__ is
> > defined and so the generic fallback isn't present, or maybe the CPUID
> > check is incorrect for your CPU?  I'll check the former when I have a

> Locally there is no indication these simple checks are being performed.
> This indicates __BMI1__ is incorrectly defined.
> (Or perhaps there is no runtime detection going on and what we are
> seeing is output from intrinsics compiled for a platform that supports
> the popcnt instruction.)

I have two 64-bit laptops, both running Debian unstable.  On the newish
one, which has an Intel(R) Core(TM) i7-5600U CPU, the mtxrun works fine
(no "illegal instruction").

On the ancient one, which has an Intel(R) Core(TM)2 Duo CPU T9300, it
fails right away.  According to x86-64-level
<https://github.com/HenrikBengtsson/x86-64-level>, it's a level-1 CPU.

Here is its cpuinfo, in case it's useful:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     T9300  @ 2.50GHz
stepping        : 6
microcode       : 0x60f
cpu MHz         : 1197.124
cache size      : 6144 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm 
constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 
monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm pti tpr_shadow 
flexpriority vpid dtherm ida vnmi
vmx flags       : vnmi flexpriority tsc_offset vtpr vapic
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds 
swapgs itlb_multihit mmio_unknown
bogomips        : 4988.01
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     T9300  @ 2.50GHz
stepping        : 6
microcode       : 0x60f
cpu MHz         : 1197.124
cache size      : 6144 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm 
constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 
monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm pti tpr_shadow 
flexpriority vpid dtherm ida vnmi
vmx flags       : vnmi flexpriority tsc_offset vtpr vapic
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds 
swapgs itlb_multihit mmio_unknown
bogomips        : 4988.01
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:


-- 
-Sanjoy

Reply via email to