From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12155 invoked by alias); 24 Jul 2018 04:17:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 12140 invoked by uid 89); 24 Jul 2018 04:17:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=han, Han, H*r:0700 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Jul 2018 04:17:24 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1fholF-0000Xi-WB from Sandra_Loosemore@mentor.com ; Mon, 23 Jul 2018 21:17:22 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 23 Jul 2018 21:17:19 -0700 To: "gcc-patches@gcc.gnu.org" CC: Han Mao , Yunhai Shang From: Sandra Loosemore Subject: [0/5] C-SKY port Message-ID: <49d0a2c8-51a0-4a74-d015-0bf1c1098e38@codesourcery.com> Date: Tue, 24 Jul 2018 04:17:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-07/txt/msg01289.txt.bz2 This patch series is a new port for C-SKY ABI V2 processors. It's based on the original work by C-SKY with cleanup, modernization, and bug-fixing by Mentor Graphics. The supported targets are csky-elf and csky-linux-* (both glibc and uClibc). At this time we're only supporting the C and C++ languages, but we've built all the other front ends except Ada where we're still trying to sort out build environment issues. C-SKY proposes Han Mao and Yunhai Shang as maintainers for this port. We expect that C-SKY will also be providing a public link to the processor and ABI documentation at some point. Meanwhile, here's brief overview of the architecture from the compiler's point of view: 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. The ELF target is configured to build 16(!) multilibs and the Linux targets 8, to account for hard/soft float variants and endiannesses. We've been testing all of them with QEMU (user-mode for the Linux targets, since we don't have a stable kernel yet) and the results are quite good now. I've split the patch set up into 5 pieces, with part 2 having the bulk of the new code: [1] Configury [2] Backend implementation [3] Documentation [4] Testsuite [5] libgcc We also have a couple small patches to target-independent code to fix bugs, which we'll post separately. -Sandra