GCC Patches Posted For Port To Chinese "C-SKY" CPU Architecture

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.
1 Comment