GCC Patches Posted For Port To Chinese "C-SKY" CPU Architecture
Written by Michael Larabel in GNU on 25 July 2018 at 12:28 AM EDT. 1 Comment
GNU --
C-SKY is the 32-bit embedded CPU architecture developed in Hangzhou, China for the CK610/CK807/CK810/CK860 cores, among others.

For months the Linux C-SKY Linux kernel port has been in the works though has yet to be mainlined, at least as of the current Linux 4.18 cycle. Happening concurrently has been the C-SKY port for the GNU Compiler Collection (GCC).

Mentor Graphics has been contracted to work on this C-SKY compiler port for csky-elf and csky-linux targets with glibc and uclibc. In the current C-SKY patches, only the C and C++ language front-ends are supported for this CPU target.

With the patch series are some details on the architecture with the C-SKY company not yet providing a public ABI documentation:
This is a 32-bit target with mixed 16- and 32-bit instructions and support for both endiannesses. There are 5 different architecture variants. The ck801 variant is substantially different from the others in terms of code generation -- it has only a few 32-bit instructions and a restricted register set, so it's almost analagous to a Thumb-only ARM core. ck802 and ck803 have more 32-bit instructions and 16 registers, while ck807 and ck810 are Linux-capable with 32 registers.

The ABI is fairly standard; arguments are passed in r0-r3 with the overflow on the stack, return values in r0-r1, etc. There is no dedicated frame pointer register.

We'll see if these patches make it in time for the GCC 9 release in 2019.
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 10,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 or contacted via MichaelLarabel.com.

Related GNU News
Popular News This Week