To summarize our off list [GitHub] discussion...

> This [having just one version of CDC code on x86_64 - either with Jcc
> erratum workaround or not - with default depending on compiler
> version] seems a bit brittle.
>
> Should we default to -mbranches-within-32B-boundaries for newer
> compilers?

It was intentionally brittle.  It used compiler version number
as a "time bomb" to explode and drop Skylake support eventually.
That was unnecessary hackish.

I think the best possible way is to have a CPUID-based runtime dispatch
on x86_64.

I was a bit reluctant to follow that way as the O2+JccErr and O2
is the very same assembly code in many cases.  However, the overhead
of having both versions is below 1 KiB.  So, it's just easier to go that
way then to think about "right" time to drop "support" of Skylake chips.

I've replaced compile-time dispatch with runtime dispatch and rebased
the patch stack on top of current master:
https://github.com/coreutils/coreutils/compare/master...darkk:coreutils:cdc

Thanks for the nudge!

-- 
WBRBW, Leonid Evdokimov, https://darkk.net.ru tel:+79816800702
PGP: 6691 DE6B 4CCD C1C1 76A0  0D4A E1F2 A980 7F50 FAB2

Reply via email to