Windows 10 64-bit requirements: Does my CPU support CMPXCHG16b, PrefetchW and LAHF/SAHF?

12

2

I'm currently trying to find out whether or not it would be a good idea to update my slightly dated notebook (Windows 7, 64-bit) to Windows 10. The problem is that Microsoft states in their Windows 10 specifications that to use the 64-bit version of Windows 10, a processor which supports CMPXCHG16b, PrefetchW and LAHF/SAHF is needed. I know that my processor is 64-bit (Intel Core i5-2430M @ 2.40 GHz) but I don't know how to find out whether it supports CMPXCHG16b, PrefetchW and LAHF/SAHF, and I have no idea what these mean.

I tried using Google and got no results that made sense to me, only some comparison of my i5 and a similar AMD processor. I also checked Intel's ARK website. If somebody could point me to where I can get more info I would be really grateful.

roebsi

Posted 2015-06-23T22:18:18.337

Reputation: 158

1I think you are worrying too much. The i5's are relatively recent and will be fine. However, a general rule of thumb is not to run 64bit unless you have >4GB of RAM, the overheads can make things run slower rather than faster. Windows 32bit can only directly access slightly less than 4GB so only if you go over that is it worth going 64bit – Julian Knight – 2015-06-23T22:42:50.243

1If you can upgrade to Windows 8.1 you can upgrade to Windows 10. You can also run a compatibility check for both if you want. – Ramhound – 2015-06-23T23:38:28.480

Run a tool under Windows 7 that displays CPUID data, this tells you if the CPU supports the futures. I use an I5-3xxxM and here Windows 8.1 works, so it has the 3 features. You are only 1 generation behind, so it should also support all features. – magicandre1981 – 2015-06-24T04:16:23.880

I'm currently running Windows 7 Professional SP1 x64 on an HP Compaq dc5700 with 2 GiB of RAM. Does anyone know if this has CMPXCHG16b, PrefetchW, and/or LAHF/SAHF? – SarahofGaia – 2015-07-21T15:27:41.427

1@JulianKnight I'd advise 64bit to anyone with 2 or 3gb and a dedicated graphics card as the graphics card memory also needs to fit into the address space. If you have 4gb of ram and a 2gb graphics card then you've just wasted 2gb of ram and are worse off than if you'd installed 64 bit. – Mokubai – 2015-07-22T06:30:52.593

@JulianKnight - Actually, you should run 64 bit with > 3GB, not 4GB. The reason is that you cannot use all of your 4GB with 32 bit Windows, and almost a full gig will go unused. Also, 64 bit can be faster, it will just use more memory and disk space. – Erik Funkenbusch – 2015-07-28T17:47:45.650

I'm aware that 4GB cannot be fully utilised. Although I take the point make about a large graphics card, using 64bit apps has a real and significant overhead. Previous studies have shown that it really doesn't add any value until you go over 4GB. 3GB is a poor setup anyway and rarely seen due to having imbalanced memory channels. – Julian Knight – 2015-07-28T20:47:53.507

1Don't worry about that. Except for some early Atom or x86_64 CPUs, all Intel CPUs in (a little more than) a decade back can run windows 10 without problem – phuclv – 2015-10-14T08:04:49.463

Answers

21

Your processor supports these features. In fact, the same features are required to run 64-bit Windows 8.1. This requirement is met by all modern processors and is generally only an issue with certain Core 2 and earlier processors.

What are these instructions?

  • Early AMD64 processors lacked the CMPXCHG16B instruction, which is an extension of the CMPXCHG8B instruction present on most post-80486 processors. Similar to CMPXCHG8B, CMPXCHG16B allows for atomic operations on octal words. This is useful for parallel algorithms that use compare and swap on data larger than the size of a pointer, common in lock-free and wait-free algorithms. Without CMPXCHG16B one must use workarounds, such as a critical section or alternative lock-free approaches. Its absence also prevents 64-bit Windows prior to Windows 8.1 from having a user-mode address space larger than 8 terabytes. The 64-bit version of Windows 8.1 requires the instruction.
  • The PREFETCHW instruction is a hint to the processor to prefetch data from memory into the cache in anticipation for writing (Intel Instruction Set Reference, PDF page 888). This instruction was introduced in AMD's 3DNow! instruction set, which is deprecated except for the PREFETCH and PREFETCHW instructions. All AMD processors since the Athlon 64 support this instruction. However, this instruction may not be supported in some older 64-bit Intel processors predating Nehalem.

  • The LAHF and SAHF load and store the contents of the AH register into the flags register, respectively (Intel Instruction Set Reference, PDF pages 530 and 1025). Some older Intel processors without hardware virtualization (VT-x) functionality do not support this instruction when running in 64-bit long mode; these are mostly limited to certain low-end processors predating Nehalem. Some very old AMD64 processors also lack this feature.

  • Early AMD64 and Intel 64 CPUs lacked LAHF and SAHF instructions in 64-bit mode. AMD introduced these instructions (also in 64-bit mode) with their Athlon 64, Opteron and Turion 64 revision D processors in March 2005 while Intel introduced the instructions with the Pentium 4 G1 stepping in December 2005. The 64-bit version of Windows 8.1 requires this feature.

What does this mean for me?

  • All Intel Core i7, i5, or i3 processors, as well as all Pentium or Celeron processors based on the Clarkdale, Arrandale, Sandy Bridge, or newer microarchitectures, support these features, as well as Intel Atom and Celeron Silvermont processors. For AMD, all but the oldest 64-bit processors have these features.

  • You generally only need to be concerned about these instructions if you have a processor that predates the above. The Get Windows 10 app will tell you if you can upgrade to Windows 10. If the processor doesn't meet requirements, you'll get "The CPU isn't supported."

bwDraco

Posted 2015-06-23T22:18:18.337

Reputation: 41 701

1Should point out though, while these particular features are the same as required to run Windows 8.1, not all CPU features required to run Windows 10 are required to run Windows 8.1. In particular, PAE and NX are not required under 8.1 but mandatory for 10 – qasdfdsaq – 2015-11-06T14:22:44.293

Actually even Nehalem is too new. I think any 64-bit Intel processor released in 2006 and later supports these features. – Yuhong Bao – 2016-07-01T01:46:09.460

@Dog - They actually were required for Windows 8.1. They were not required for Windows 8.0. Many people were caught between a rock and a hard place, when they discovered, they couldn't receive Windows 8.1. This didn't effect hardware that came with Windows 8, most people who had problems, were those that upgraded from devices that came with Windows XP and Windows Vista. – Ramhound – 2016-09-01T00:09:32.560

1

PREFETCHW support is new (for Intel) in Broadwell, so Windows 8.1 certainly doesn't require it. Evidence: gcc compiles __builtin_prefetch(p,1,2) to PREFETCHT1 with -march=haswell, and to PREFETCHW with -march=broadwell. Also, the Linux /proc/cpuinfo dump from this Haswell CPU doesn't include 3dnowprefetch, but it does on broadwell and skylake. See http://unix.stackexchange.com/questions/43539/what-do-the-flags-in-proc-cpuinfo-mean for the meaning of flags.

– Peter Cordes – 2016-11-09T21:34:35.533

1

Maybe you were thinking of the SSE PREFETCHh instructions which have existed since PentiumIII at least.

– Peter Cordes – 2016-11-09T21:36:20.173

@PeterCordes: Are you sure about this? See http://superuser.com/questions/908367/windows-8-1-x64-installation-without-prefetchw-support

– bwDraco – 2016-11-09T21:38:01.940

1

@bwDraco: yes. Its 0F 0D r/m8 machine-code encoding decodes as a multi-byte NOP on CPUs that don't support PREFETCHW, so there's apparently no compatibility issue. (The behaviour of prefetch instructions doesn't affect correctness, just performance.) I tried it on my Core2Duo CPU, in an asm program that runs prefetchw [rsp], and the instruction executes without faulting. But I'm 99% sure it has no effect.

– Peter Cordes – 2016-11-09T21:46:43.050

@bwDraco: I suspect that the OP in that other question was actually running into the fact that early 64-bit P4 CPUs didn't implement LAHF/SAHF in long mode. PREFETCHW makes absolutely no sense as a compatibility requirement, other than having it execute without faulting. Since Intel CPUs wouldn't support it until Broadwell, it also makes zero sense that MS would "require" it for Windows8.1. – Peter Cordes – 2016-11-09T21:50:49.660

@PeterCordes PREFETCHW is required for Windows 8.1+, PREFETCHW has been around longer than Broadwell, conserving my IvyBridge CPU supports it. http://answers.microsoft.com/en-us/windows/forum/hardware/what-are-cmpxchg16b-prefetchw-and-lahfsahf-given/58cd492a-5018-41e2-bae8-90c1fff4c56e

– Ramhound – 2016-11-11T21:51:36.927

@PeterCordes Author has a second generation core processor not a Pentium 4 – Ramhound – 2016-11-11T21:56:40.407

1

Ok, there are two meanings to "support" here: Win8.1 apparently does require that PREFETCHW (0F 0D m8) doesn't fault as an illegal instruction, which is the case on Intel CPUs after P4 at least as discussed here. They run it as a no-op (until Broadwell), and of course that's sufficient for Win8.1 (because prefetches are speculative hints anyway, which don't affect correctness). I hadn't realized the NOP behaviour, or that it was different on older CPUs.

– Peter Cordes – 2016-11-11T22:41:06.227

Of course it pre-dates Broadwell. It's a 3DNow instruction which AMD CPUs have supported since k6-2 (before AMD64 existed). Intel's insn set ref manual doesn't mention the run-as-NOP behaviour that, only the PREFETCHW CPUID feature bit that indicates it actually does something. See my answer to this asm question on SO for more about which CPUs actually support write-intent prefetch.

– Peter Cordes – 2016-11-11T22:44:39.890

Anyway, your IvB and the OP's Sandybridge run it as a NOP. They do not really support PREFETCHW, but you could be sloppy and say they do for compatibility purposes (especially since everyone apparently does that). – Peter Cordes – 2016-11-11T22:45:50.103

To be more precise, 3DNow prefetch as NOP was introduced in the 65nm P4 in 2006 I think. Older versions of Windows emulated this instruction on older Intel CPUs. – Yuhong Bao – 2017-08-02T08:17:14.573

Ahh!! So it's a NOP in p4, and Windows 8 won't die without it? but it's supported only in new Broadwell chipsets? That makes sense. – Evan Carroll – 2017-09-19T23:33:59.047

1

If you can use the command line in Windows then:

  • Get SysInternals coreinfo.exe from technet
  • Run coreinfo > coreinfo.txt
  • Open the file in a text editor, and do a find (case insensitive) for each of the instructions

PS: In Linux you would use grep flags /proc/cpuinfo | head -1

robocat

Posted 2015-06-23T22:18:18.337

Reputation: 131

0

There is a utility called coreinfo, provided by Microsoft, that provides functionality like cat /proc/cpuinfo on Linux.

You have to search through this but you can find the information here,

LAHF-SAHF       -       Supports LAHF/SAHF instructions in 64-bit mode
NX              -       Supports no-execute page protection
CX16            *       Supports CMPXCHG16B instruction
X64             *       Supports 64-bit mode
PREFETCHW       -       Supports PREFETCHW instruction

The - mean that the CPU lacks that feature, the * mean it has that feature.

Now that I look, coreinfo is actually suggested by Microsoft to make the determination on that doc page,

Coreinfo is a tool you can use to confirm which of these capabilities your CPU has.+

Full result for my processor, a Intel E7525, looks like this,

Coreinfo v3.31 - Dump information on system CPU and memory topology
Copyright (C) 2008-2014 Mark Russinovich
Sysinternals - www.sysinternals.com

Intel(R) Xeon(TM) CPU 3.40GHz
x86 Family 15 Model 4 Stepping 3, GenuineIntel
Microcode signature: 00000005
HTT             *       Hyperthreading enabled
HYPERVISOR      -       Hypervisor is present
VMX             -       Supports Intel hardware-assisted virtualization
SVM             -       Supports AMD hardware-assisted virtualization
X64             *       Supports 64-bit mode

SMX             -       Supports Intel trusted execution
SKINIT          -       Supports AMD SKINIT

NX              -       Supports no-execute page protection
SMEP            -       Supports Supervisor Mode Execution Prevention
SMAP            -       Supports Supervisor Mode Access Prevention
PAGE1GB         -       Supports 1 GB large pages
PAE             *       Supports > 32-bit physical addresses
PAT             *       Supports Page Attribute Table
PSE             *       Supports 4 MB pages
PSE36           *       Supports > 32-bit address 4 MB pages
PGE             *       Supports global bit in page tables
SS              *       Supports bus snooping for cache operations
VME             *       Supports Virtual-8086 mode
RDWRFSGSBASE    -       Supports direct GS/FS base access

FPU             *       Implements i387 floating point instructions
MMX             *       Supports MMX instruction set
MMXEXT          -       Implements AMD MMX extensions
3DNOW           -       Supports 3DNow! instructions
3DNOWEXT        -       Supports 3DNow! extension instructions
SSE             *       Supports Streaming SIMD Extensions
SSE2            *       Supports Streaming SIMD Extensions 2
SSE3            *       Supports Streaming SIMD Extensions 3
SSSE3           -       Supports Supplemental SIMD Extensions 3
SSE4a           -       Supports Streaming SIMDR Extensions 4a
SSE4.1          -       Supports Streaming SIMD Extensions 4.1
SSE4.2          -       Supports Streaming SIMD Extensions 4.2

AES             -       Supports AES extensions
AVX             -       Supports AVX intruction extensions
FMA             -       Supports FMA extensions using YMM state
MSR             *       Implements RDMSR/WRMSR instructions
MTRR            *       Supports Memory Type Range Registers
XSAVE           -       Supports XSAVE/XRSTOR instructions
OSXSAVE         -       Supports XSETBV/XGETBV instructions
RDRAND          -       Supports RDRAND instruction
RDSEED          -       Supports RDSEED instruction

CMOV            *       Supports CMOVcc instruction
CLFSH           *       Supports CLFLUSH instruction
CX8             *       Supports compare and exchange 8-byte instructions
CX16            *       Supports CMPXCHG16B instruction
BMI1            -       Supports bit manipulation extensions 1
BMI2            -       Supports bit manipulation extensions 2
ADX             -       Supports ADCX/ADOX instructions
DCA             -       Supports prefetch from memory-mapped device
F16C            -       Supports half-precision instruction
FXSR            *       Supports FXSAVE/FXSTOR instructions
FFXSR           -       Supports optimized FXSAVE/FSRSTOR instruction
MONITOR         *       Supports MONITOR and MWAIT instructions
MOVBE           -       Supports MOVBE instruction
ERMSB           -       Supports Enhanced REP MOVSB/STOSB
PCLMULDQ        -       Supports PCLMULDQ instruction
POPCNT          -       Supports POPCNT instruction
LZCNT           -       Supports LZCNT instruction
SEP             *       Supports fast system call instructions
LAHF-SAHF       -       Supports LAHF/SAHF instructions in 64-bit mode
HLE             -       Supports Hardware Lock Elision instructions
RTM             -       Supports Restricted Transactional Memory instructions

DE              *       Supports I/O breakpoints including CR4.DE
DTES64          *       Can write history of 64-bit branch addresses
DS              *       Implements memory-resident debug buffer
DS-CPL          *       Supports Debug Store feature with CPL
PCID            -       Supports PCIDs and settable CR4.PCIDE
INVPCID         -       Supports INVPCID instruction
PDCM            -       Supports Performance Capabilities MSR
RDTSCP          -       Supports RDTSCP instruction
TSC             *       Supports RDTSC instruction
TSC-DEADLINE    -       Local APIC supports one-shot deadline timer
TSC-INVARIANT   -       TSC runs at constant rate
xTPR            *       Supports disabling task priority messages

EIST            *       Supports Enhanced Intel Speedstep
ACPI            *       Implements MSR for power management
TM              *       Implements thermal monitor circuitry
TM2             -       Implements Thermal Monitor 2 control
APIC            *       Implements software-accessible local APIC
x2APIC          -       Supports x2APIC

CNXT-ID         *       L1 data cache mode adaptive or BIOS

MCE             *       Supports Machine Check, INT18 and CR4.MCE
MCA             *       Implements Machine Check Architecture
PBE             *       Supports use of FERR#/PBE# pin

PSN             -       Implements 96-bit processor serial number

PREFETCHW       -       Supports PREFETCHW instruction

Maximum implemented CPUID leaves: 00000005 (Basic), 80000008 (Extended).

Logical to Physical Processor Map:
*-  Physical Processor 0
-*  Physical Processor 1

Logical Processor to Socket Map:

Logical Processor to NUMA Node Map:
**  NUMA Node 0

Logical Processor to Cache Map:

Evan Carroll

Posted 2015-06-23T22:18:18.337

Reputation: 1

-5

"Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz"

"PREFETCHWT1 Instruction Not Supported"

From AIDA 64 Extreme. ^^

These three - CMPXCHG16b, PrefetchW and LAHF/SAHF are required for upgrade to a 64bit version of Windows 10 from a current 64bit installation of Windows 7.

Jota

Posted 2015-06-23T22:18:18.337

Reputation: 1

6PREFETCHWT1 is a separate instruction and is not required, so don't confuse it with PREFETCHW. – bwDraco – 2015-07-22T01:33:28.580