On 17/05/2026 16:39, Leonid Evdokimov wrote:
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!
I've not got to the meat of the patch just yet,
but noticed these "plumbing" issues,
which would be great to update your patch set with,
rather than having them as cleanups on top.
https://github.com/darkk/coreutils/compare/cdc...pixelb:coreutils:cdc-fixes1
With the above changes `make syntax-check` passes,
and tarball from `make dist` should build portably
(though I've not checked that myself yet).
thanks,
Padraig