Comment savoir si mon processeur 64 bits supporte LAHF, SAHF, CMPXCHG16b et PrefetchW ?
Windows 8.1 et Windows 10 nécessitent d'avoir les instructions LAHF, SAHF, CMPXCHG16b et PrefetchW pour fonctionner en 64bits (par contre Windows 8 et ses prédécesseurs fonctionnent bien en 64bits sans).
Les premiers Pentium 4 64bits et les premiers Athlon 64 n'ont pas ces instructions.
Comment savoir si ce Athlon 64 supporte ces 4 instructions via un lscpu sous Linux ?
$ lscpu
Architecture: x86_64
Mode(s) opératoire(s) des processeurs :32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) par cœur : 1
Cœur(s) par socket : 1
Socket(s): 1
Nœud(s) NUMA : 1
Identifiant constructeur :AuthenticAMD
Famille de processeur :15
Modèle : 95
Model name: AMD Athlon(tm) 64 Processor 3200+
Révision : 2
Vitesse du processeur en MHz :1000.000
CPU max MHz: 2000,0000
CPU min MHz: 1000,0000
BogoMIPS: 2004.36
Virtualisation : AMD-V
Cache L1d : 64K
Cache L1i : 64K
Cache L2 : 512K
NUMA node0 CPU(s): 0
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good nopl extd_apicid pni cx16 lahf_lm svm extapic cr8_legacy 3dnowprefetch vmmcall
Sur un processeur de dernière génération, qui supporte bien sur ces instructions, je ne vois pas de flag "PREFETCH/PREFETCHW", "CMPXCHG16B" ou "SAHF". Il y a par contre un flag "lahf_lm" :
$ lscpu
Architecture: x86_64
Mode(s) opératoire(s) des processeurs :32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) par cœur : 2
Cœur(s) par socket : 4
Socket(s): 1
Nœud(s) NUMA : 1
Identifiant constructeur :GenuineIntel
Famille de processeur :6
Modèle : 158
Model name: Intel(R) Xeon(R) CPU E3-1240 v6 @ 3.70GHz
Révision : 9
Vitesse du processeur en MHz :3700.000
CPU max MHz: 4100,0000
CPU min MHz: 800,0000
BogoMIPS: 7392.00
Virtualisation : VT-x
Cache L1d : 32K
Cache L1i : 32K
Cache L2 : 256K
Cache L3 : 8192K
NUMA node0 CPU(s): 0-7
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 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp