News for hackers. Stuff that matters.
Re:Does a compiler use all x86 instructions? (2010) by mkup on Wednesday August 24, 2016 @03:04PM (#12354424)
According to [1], on recent Intel CPUs, each instruction is translated by hardware decoder to up to four micro-ops: either trivial micro-ops like addition, subtraction, bitwise and/or/xor, or a special "microcode assist" micro-op which is essentially a function call into the CPU microcode table. According to the same source, CPU microcode table is believed to consist roughly of 20,000 micro-ops which handle edge cases like rare instructions, rare prefixes, FPU denormals, traps/exceptions, all that stuff. Also, CPU microcode table is believed to contain full-blown implementations of RSA and SHA-256 in order to support microcode updates.

So, yes, there's a performance gap between instructions with hardware fast path and ones which require a microcode assist.

[1] https://eprint.iacr.org/2016/086.pdf

Re:Does a compiler use all x86 instructions? (2010) by CyberDildonics on Wednesday August 24, 2016 @04:33PM (#12355024)
The new slides for AMD Zen say explicitly that it has hardware sha256 support.
Re:Does a compiler use all x86 instructions? (2010) by majewsky on Thursday August 25, 2016 @05:49AM (#12357867)
Careful. Do they mean an ISA extension to support fast SHA-256 implementations in your code, or do they have a SHA-256 implementation in their microcode for CPU-internal use?
Re:Does a compiler use all x86 instructions? (2010) by CyberDildonics on Thursday August 25, 2016 @09:34AM (#12358831)
I don't know and that goes beyond my point. The original poster said that it is rumored that Intel has a full implementation of sha256 in microcode. I am saying that AMD has confirmed that they at least have it in microcode.