SDL Adds Initial Support For LoongArch

Written by Michael Larabel in Linux Gaming on 8 June 2022 at 05:27 AM EDT. Add A Comment
LINUX GAMING --
The SDL library that is widely used by cross-platform games as a software/hardware abstraction layer has merged support for the Chinese LoongArch CPU architecture.

It was just this past weekend that LoongArch support landed in Linux 5.19 albeit for this initial kernel release it's not enough to actually yield a working system. Some necessary LoongArch drivers to actually having a booting, functioning system have yet to be mainlined. But getting the CPU architecture code into Linux 5.19 at least clears the way for LoongArch support to be introduced this summer into the GNU C Library.

Meanwhile this week the Simple DirectMedia Library (SDL) has added support for the LoongArch architecture. SDL's LoongArch port includes adding support for optimized LSX and LASX Assembly routines.

This initial ~268 lines of new code for LoongArch SDL support was authored by Hecai Yuan of Loongson who has also worked on LoongArch support for FFmpeg and other open-source software. See these commits for more details on the initial LoongArch CPU support for the SDL library.


The Loongson 3A5000 is the initial LoongArch CPU model in moving past MIPS64.


LoongArch was developed by Loongson now that the MIPS64 upstream architecture they previously relied on is basically dead. LoongArch is "inspired" by MIPS64 and RISC-V. Prior to getting the LoongArch support into Linux 5.19, it was the GCC 12 compiler earlier this year that introduced the initial compiler support.
Related News
About The Author
Author picture

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