From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 98292385C8B0 for ; Fri, 1 Dec 2023 10:08:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 98292385C8B0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 98292385C8B0 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=114.242.206.163 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701425327; cv=none; b=kc02J3U/Xi6yeTgX45IfbBXvy+lhRgAcXQ9aQnidfiazeHLv1tEgFZzhnwxuy/iSfettZINLh09pOOi++daj+hLXyJ2I40d5QKOnZ+ujn9+TqPxE74xaaOjpLZ/k+sJcy4QyhdRmsfVF0/XAdideqGfcU/ZvWvMyiYlHSCLQ1To= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701425327; c=relaxed/simple; bh=5SuA5uKsuqRcxR01PRtmNhQrCgi9H8vQbZ5cm1K0EWE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=PMkvWz+pNwnxVL6P2RdLO9+6UPg/tvE8FbAJIrqlrqnfNhfTQrUX9YbR75p6ujs9I3g+Dm3fcMrYq6Z+cPLWSmX7EylYyDbeu1nJSL4H0Qr1CRxC3PkbHk+gy1Tptj72SazHHEYZIKC+RNusgKkj1BtK3NGAWIx1f0/l6oR4qMA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [114.243.104.185]) by gateway (Coremail) with SMTP id _____8AxlPCosGllhys+AA--.58340S3; Fri, 01 Dec 2023 18:08:41 +0800 (CST) Received: from localhost.localdomain (unknown [114.243.104.185]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxLC+lsGllaYRRAA--.8937S2; Fri, 01 Dec 2023 18:08:37 +0800 (CST) From: Yang Yujie To: gcc-patches@gcc.gnu.org Cc: ibuclaw@gdcproject.org, chenglulu@loongson.cn, xuchenghua@loongson.cn, Yang Yujie Subject: [PATCH v3 0/3] LoongArch D support Date: Fri, 1 Dec 2023 18:08:24 +0800 Message-ID: <20231201100827.227376-1-yangyujie@loongson.cn> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:AQAAf8CxLC+lsGllaYRRAA--.8937S2 X-CM-SenderInfo: 51dqw5pxmlvqxorr0wxvrqhubq/1tbiAQAMAGVpQqsHIgAXsa X-Coremail-Antispam: 1Uk129KBj93XoW7trWUWFyruw1DWF1fZFykCrX_yoW8Cry7pr ZrZF1ftrWYyFWxJws3J3srXa15AFZ3Ww1UXFy7tw1jyryrur4UKwn3KrWF9F17G34YqFyj vryxuws8Ga4qv3cCm3ZEXasCq-sJn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUk2b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv 67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s02 6x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0x vE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE 42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6x kF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU7pnQUUUUU X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_SHORT,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This patchset is based on Zixing Liu's initial support patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631260.html Update v1 -> v3: Rebased onto the dmd/druntime upstream state. Regtested on loongarch64-linux-gnu with the following result: === libphobos Summary === FAIL: libphobos.config/test22523.d -- --DRT-testmode=run-main execution test FAIL: libphobos.gc/precisegc.d execution test FAIL: libphobos.phobos/std/datetime/systime.d (test for excess errors) UNRESOLVED: libphobos.phobos/std/datetime/systime.d compilation failed to produce executable UNSUPPORTED: libphobos.phobos/std/net/curl.d: skipped test UNSUPPORTED: libphobos.phobos_shared/std/net/curl.d: skipped test FAIL: libphobos.shared/loadDR.c -ldl -pthread -g execution test (out-of-tree testing) # of expected passes 1024 # of unexpected failures 4 # of unresolved testcases 1 # of unsupported tests 2 === gdc Summary === FAIL: gdc.test/runnable/testaa.d execution test FAIL: gdc.test/runnable/testaa.d -fPIC execution test # of expected passes 10353 # of unexpected failures 2 # of unsupported tests 631 Yang Yujie (3): LoongArch: Adjust D version strings. libphobos: Update build scripts for LoongArch64. libruntime: Add fiber context switch code for LoongArch. gcc/config/loongarch/loongarch-d.cc | 27 ++-- gcc/d/dmd/cond.d | 6 +- gcc/d/implement-d.texi | 6 + libphobos/configure | 21 ++- libphobos/libdruntime/Makefile.am | 3 + libphobos/libdruntime/Makefile.in | 98 ++++++++----- .../config/loongarch/switchcontext.S | 133 ++++++++++++++++++ libphobos/m4/druntime/cpu.m4 | 5 + 8 files changed, 243 insertions(+), 56 deletions(-) create mode 100644 libphobos/libdruntime/config/loongarch/switchcontext.S -- 2.43.0