[PATCH 0/5] i386: Optimize for Jump Conditional Code Erratum

Fangrui Song i@maskray.me
Fri Nov 15 00:17:00 GMT 2019


On 2019-11-12, H.J. Lu wrote:
>Microcode update for Jump Conditional Code Erratum may cause performance
>loss for some workloads:
>
>https://www.intel.com/content/www/us/en/support/articles/000055650.html
>
>Here is the set of assembler patches to mitigate performance impact by
>aligning branches within 32-byte boundary.  The impacted instructions
>are:

So, a few questions.

1. Without the assembler mitigation, what is the performance hit with and
  without the microcode update?
2. What is the code size increase of this assembler mitigation?
3. Why is the jcc+fused+jmp set suggested? (-mbranches-within-32B-boundaries)
  What is the performance and code size impact with this set compared
  with the full set? Among "jcc+fused+call+jmp+ret+indirect", which one
  gives the largest hit?
4. Shall we default to -mbranches-within-32B-boundaries if the specified
   -march= or -mtune= may be affected by the erratum?
5. Do we need to increase the section alignment (sh_addralign)?



More information about the Binutils mailing list