News: 1652847965

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

GNU Compiler Collection adds support for China's LoongArch CPU family

(2022/05/18)


Version 12.1 of the GNU Compiler Collection (GCC) was released this month, and among its many changes is support for China's LoongArch processor architecture.

The announcement of the release is [1]here ; the LoongArch port was [2]accepted as recently as March.

China's Academy of Sciences developed a family of MIPS-compatible microprocessors in the early 2000s. In 2010 the tech was spun out into a company callled Loongson Technology which today markets silicon under the brand "Godson". The company bills itself as working to develop technology that secures China and underpins its ability to innovate, a reflection of Beijing's believe that home-grown CPU architectures are critical to the nation's future.

[3]

LoongArch [4]emerged from Loongson around about last year, and was described as a new RISC ISA that comes in 32-bit and 64-bit flavours.

[5]

[6]

GCC 12.1 seemingly supports the 64-bit side (LA64), according to the release notes:

Support for the LoongArch architecture instruction set has been added. The Loongson CPU codename LA464 and LoongArch 64-bit generic CPU codename loongarch64 are supported through the -march= and -mtune= options (GCC identifiers in parentheses).

The ISA's designers have said LoongArch is similar to MIPS and RISC-V; at least one Linux kernel developer has complained it's basically MIPS all over again. MIPS isn't so trendy these days – RISC-V is the new open-source silicon hotness. Even [7]MIPS the company is doing RISC-V chips. Although China [8]made some bold claims about RISC-V, it can't quite seem to let go of MIPS for its Loongson line.

LoongArch is said to be the CPU architecture of Loongson's latest silicon, such as the 3A5000 processor. Previous chips, such as the 3A4000, are definitely 64-bit MIPS affairs. Loongson engineers tried to [9]submit code to the Linux kernel in March this year to support an LS3A4000-powered motherboard made by Chinese computer-maker Lemote.

One Chinese blogger published an informative [10]review of this MIPS64 Lemote system. It was made to run UnionTech UOS, which is the China-only commercial version of Debian-based [11]Deepin .

[12]Turing Pi 2 crowdfunding goal smashed within a day

[13]The sad state of Linux desktop diversity: 21 environments, just 2 designs

[14]Python is getting faster: Major performance tweaks on horizon

[15]Workstation, server, IoT? No worries. Fedora 36 is out – all 13 editions of it

Another MIPS64 Lemote model, the [16]Fulong mini-PC , comes with a version of Fedora called Dragon Dream F28, and web engine developers Igalia report that it's [17]tricky to run anything else on the box.

This is why getting support into the upstream Linux kernel is important, and there is [18]at least some Loongson support in the mainline kernel codebase (not so much for LoongArch so far). For anything that doesn't make or hasn't made it into the open-source project, Loongson and its customers must maintain their own branch of the kernel, such as [19]Loongnix . If the [20]source code on GitHub is any indication, this effort can lag considerably behind the current kernel.

[21]

Loongson is not the only Chinese processor line. The newer RISC-V architecture [22]XiangShan processors look promising. There is, or was, also an x86-compatible joint venture with Taiwanese Via Technologies, the [23]KaiXian range from Zhaoxin . Huawei has developed an Arm-based range of "Kunpeng" processors, and China's top clouds have developed silicon for servers and AO. However, it looks like Loongson is not going away just yet. ®

Get our [24]Tech Resources



[1] https://gcc.gnu.org/pipermail/gcc-announce/2022/000171.html

[2] https://gcc.gnu.org/pipermail/gcc/2022-March/238452.html

[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/systems&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YoTDx0b814Dd53osvW6d5AAAABE&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[4] https://www.theregister.com/2021/11/02/china_loongson_mips/

[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/systems&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YoTDx0b814Dd53osvW6d5AAAABE&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/systems&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YoTDx0b814Dd53osvW6d5AAAABE&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[7] https://www.theregister.com/2022/05/11/mips_riscv_chips/

[8] https://www.theregister.com/2021/12/06/china_riscv/

[9] https://lkml.org/lkml/2022/3/21/1037

[10] https://virtuallyfun.com/wordpress/2020/09/24/a-modern-risc-workstation-for-a-modern-government-era/

[11] https://www.theregister.com/2022/04/01/deepin_205_surfaces/

[12] https://www.theregister.com/2022/05/17/turing_pi_2_kickstarter/

[13] https://www.theregister.com/2022/05/17/linux_desktop_feature/

[14] https://www.theregister.com/2022/05/16/python_is_getting_faster/

[15] https://www.theregister.com/2022/05/12/fedora_36_released/

[16] https://www.cyrius.com/debian/loongson/fulong/gallery/

[17] https://http503.gvatas.in/2021/03/31/running-debian-in-a-fulong-2-0-mini-pc-mips64el-cpu-loongson-3a4000/

[18] https://github.com/torvalds/linux/search?q=loongson&type=code

[19] http://www.loongnix.cn/

[20] https://github.com/FlyGoat/linux-loongnix

[21] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/systems&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YoTDx0b814Dd53osvW6d5AAAABE&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[22] https://www.theregister.com/2021/07/06/xiangshan_risc_v/

[23] https://www.theregister.com/2019/06/20/huawei_storage/

[24] https://whitepapers.theregister.com/



As the trials of life continue to take their toll, remember that there
is always a future in Computer Maintenance.
-- National Lampoon, "Deteriorata"