Zhaoxin Finally Adding "Lujiazui" x86_64 CPU Tuning To GCC

Written by Michael Larabel in GNU on 25 March 2022 at 06:08 AM EDT. 8 Comments
GNU
Introduced back in 2019 by the VIA + Shanghai owned Zhaoxin was the ZX-E / KX-6000 series x86_64 processors. Finally in 2022 the proper GCC compiler tuning support has been published for these processors that are part of the "Lujiazui" microarchitecture.

Back in 2019 Zhaoxin upstreamed Linux kernel support for their hardware and then proceeded to work on their newer unreleased CPUs too (KX-7000). But the GCC compiler support never took priority even with the GNU Compiler Collection being widely used by x86_64 Linux distributions.

ZX-E / KX-6000 series "Lujiazui" with GCC. Due to being an x86_64 CPU the GCC compiler has worked with these processors, but the compiler has identified the Zhaoxin processors incorrectly and ultimately attributing them as an Intel Core 2 or i386 CPU. Today's patch not only correctly identifies the processor but also has the proper cost tables and tunings for the Lujiazui microarchitecture.

The Zhaoxin KX-6000 series formally launched in 2019 with up to eight x86_64 cores manufactured on a TSMC 16nm process. Meanwhile Zhaoxin has been working on a more competitive KX-7000 (ZX-F) series based on TSMC 7nm and with DDR5 and PCI Express 4.0 connectivity. The Zhaoxin KX-7000 series was supposed to be introduced in 2021 but we haven't heard much about it recently, presumably another COVID or supply chain related delay. In any event, today's GCC patch work is only for the KX-6000 / Lujiazui CPUs.


Zhaoxin SoC


The enablement patch also allows GCC -march/-mtune value of "lujiazui" for specifically targeting this microarchitecture. GCC 12 is fast approaching release time so we'll see if the 1,158 line patch will still be added this cycle - we're in stage four development but this addition shouldn't risk regressing GCC so may still be permitted.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week