What is x86-64-v3?

What is x86-64-v3?

You may have heard Linux pundits discussing x86-64-v3. Can recompiling Linux code to use this bring benefits? To answer that question, you probably need to know what x86-64-v3 is, and [Gary Explains]… well… explains it in a recent video.


If you’d rather digest text, RedHat has a recent article about their experiments using the instructions set in RHEL10. From that article, you can see that most of the new instructions support some enhancements for vectors and bit manipulation. It also allows for more flexible instructions that leave their results in an explicit destination register instead of one of the operand registers.


Of course, none of this matters for high-level code unless the compiler supports it. However, gcc version 12 will automatically vectorize code when using the -O2 optimization flags.



There’s a snag of course, that will make code incompatible with older CPUs. How old? Intel has supported these instructions since 2013 in the Haswell CPUs. Although some Atom CPUs have had v3 since 2021, some later Intel Atoms do not support it fully. AMD came to the party in 2015. There is a newer set of instructions, x86-64-v4. However, this is still too new, so most people, including RedHat, plan to support v3 for now. You can find a succinct summary table on Wikipedia.


So, outside of Atom processors, you must have some old hardware to not have the v3 instructions. Some of these instructions are pretty pervasive, so switching at run t ..

Support the originator by clicking the read the rest link below.