This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 0/5] i386: Optimize for Jump Conditional Code Erratum
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 12 Nov 2019 08:19:00 -0800
- Subject: [PATCH 0/5] i386: Optimize for Jump Conditional Code Erratum
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:
a. Conditional jump.
b. Fused conditional jump.
c. Unconditional jump.
d. Call.
e. Ret.
f. Indirect jump and call.
The new -mbranches-within-32B-boundaries command-line option aligns
conditional jump, fused conditional jump and unconditional jump within
32-byte boundary.
md_cons_worker, which allows a backend to track hard-coded opcodes in
instruction stream, and md_generic_table_relax_frag, which allows a
backend to extend relax_frag, are added to implement this new feature.
H.J. Lu (5):
gas: Add md_cons_worker
gas: Add md_generic_table_relax_frag
i386: Align branches within a fixed boundary
i386: Add -mbranches-within-32B-boundaries
i386: Add tests for -malign-branch-boundary and -malign-branch
gas/config/tc-i386.c | 968 +++++++++++++++++-
gas/config/tc-i386.h | 31 +
gas/doc/c-i386.texi | 37 +
gas/read.c | 4 +
gas/testsuite/gas/i386/align-branch-1.s | 72 ++
gas/testsuite/gas/i386/align-branch-1a.d | 77 ++
gas/testsuite/gas/i386/align-branch-1b.d | 77 ++
gas/testsuite/gas/i386/align-branch-1c.d | 77 ++
gas/testsuite/gas/i386/align-branch-1d.d | 76 ++
gas/testsuite/gas/i386/align-branch-1e.d | 77 ++
gas/testsuite/gas/i386/align-branch-1f.d | 77 ++
gas/testsuite/gas/i386/align-branch-1g.d | 77 ++
gas/testsuite/gas/i386/align-branch-1h.d | 76 ++
gas/testsuite/gas/i386/align-branch-2.s | 49 +
gas/testsuite/gas/i386/align-branch-2a.d | 55 +
gas/testsuite/gas/i386/align-branch-2b.d | 55 +
gas/testsuite/gas/i386/align-branch-2c.d | 55 +
gas/testsuite/gas/i386/align-branch-3.d | 33 +
gas/testsuite/gas/i386/align-branch-3.s | 28 +
gas/testsuite/gas/i386/align-branch-4.s | 30 +
gas/testsuite/gas/i386/align-branch-4a.d | 36 +
gas/testsuite/gas/i386/align-branch-4b.d | 36 +
gas/testsuite/gas/i386/align-branch-5.d | 36 +
gas/testsuite/gas/i386/align-branch-5.s | 32 +
gas/testsuite/gas/i386/i386.exp | 37 +
.../gas/i386/x86-64-align-branch-1.s | 70 ++
.../gas/i386/x86-64-align-branch-1a.d | 75 ++
.../gas/i386/x86-64-align-branch-1b.d | 75 ++
.../gas/i386/x86-64-align-branch-1c.d | 75 ++
.../gas/i386/x86-64-align-branch-1d.d | 74 ++
.../gas/i386/x86-64-align-branch-1e.d | 74 ++
.../gas/i386/x86-64-align-branch-1f.d | 75 ++
.../gas/i386/x86-64-align-branch-1g.d | 75 ++
.../gas/i386/x86-64-align-branch-1h.d | 74 ++
.../gas/i386/x86-64-align-branch-2.s | 44 +
.../gas/i386/x86-64-align-branch-2a.d | 50 +
.../gas/i386/x86-64-align-branch-2b.d | 50 +
.../gas/i386/x86-64-align-branch-2c.d | 50 +
.../gas/i386/x86-64-align-branch-3.d | 32 +
.../gas/i386/x86-64-align-branch-3.s | 27 +
.../gas/i386/x86-64-align-branch-4.s | 27 +
.../gas/i386/x86-64-align-branch-4a.d | 33 +
.../gas/i386/x86-64-align-branch-4b.d | 33 +
.../gas/i386/x86-64-align-branch-5.d | 37 +
gas/write.c | 5 +
45 files changed, 3259 insertions(+), 4 deletions(-)
create mode 100644 gas/testsuite/gas/i386/align-branch-1.s
create mode 100644 gas/testsuite/gas/i386/align-branch-1a.d
create mode 100644 gas/testsuite/gas/i386/align-branch-1b.d
create mode 100644 gas/testsuite/gas/i386/align-branch-1c.d
create mode 100644 gas/testsuite/gas/i386/align-branch-1d.d
create mode 100644 gas/testsuite/gas/i386/align-branch-1e.d
create mode 100644 gas/testsuite/gas/i386/align-branch-1f.d
create mode 100644 gas/testsuite/gas/i386/align-branch-1g.d
create mode 100644 gas/testsuite/gas/i386/align-branch-1h.d
create mode 100644 gas/testsuite/gas/i386/align-branch-2.s
create mode 100644 gas/testsuite/gas/i386/align-branch-2a.d
create mode 100644 gas/testsuite/gas/i386/align-branch-2b.d
create mode 100644 gas/testsuite/gas/i386/align-branch-2c.d
create mode 100644 gas/testsuite/gas/i386/align-branch-3.d
create mode 100644 gas/testsuite/gas/i386/align-branch-3.s
create mode 100644 gas/testsuite/gas/i386/align-branch-4.s
create mode 100644 gas/testsuite/gas/i386/align-branch-4a.d
create mode 100644 gas/testsuite/gas/i386/align-branch-4b.d
create mode 100644 gas/testsuite/gas/i386/align-branch-5.d
create mode 100644 gas/testsuite/gas/i386/align-branch-5.s
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-1.s
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-1a.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-1b.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-1c.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-1d.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-1e.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-1f.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-1g.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-1h.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-2.s
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-2a.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-2b.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-2c.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-3.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-3.s
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-4.s
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-4a.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-4b.d
create mode 100644 gas/testsuite/gas/i386/x86-64-align-branch-5.d
--
2.21.0