From patchwork Sat Sep 23 23:30:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liushuyu X-Patchwork-Id: 14447 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp412296vqu; Sat, 23 Sep 2023 16:32:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdJ/kpUe9ZhKXAQwC9DmvzQdQvjZrqePxWk5QjEGIvXHjk96SYINiWxYKclXxwRKG6wAfc X-Received: by 2002:a2e:999a:0:b0:2bb:a123:2db7 with SMTP id w26-20020a2e999a000000b002bba1232db7mr2548240lji.51.1695511919768; Sat, 23 Sep 2023 16:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695511919; cv=none; d=google.com; s=arc-20160816; b=aAzWjV8FAiiP3ZGjmTtTdx2aQuMCOcd/sOnUIgnwxk4HRrAep/w8V1dIXseT5BwQKH ckQ+5Cqb6PJ25P6z++RorsPpQlqKkw6lIF6gkiGVRBrpuVTDao+zGn9IyfoKeXpjUIn/ iTqlIjWocdwEGN2hZbIQhEl70EMQpf7WTf5I3xHS+2kaZTXF9ECe/nsbaHNUg4nx42qP Tx1hEfB1qZv7CpUDyLs4H7qMThGTd3wIfctfelfdiEmpN/UcZrK87fd/xGlqifFJo/71 tj/FiIgI+VqhxKfaddV9iW47eoxLq/uE20EJStoDGYofFFbuks7CFcHYdHwhnFXcjXfq fRQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=bmxHKWwio2cPx8wisdgkTFAbPMGjyUgA+59rIRdoEsw=; fh=lpdOgR2iUQD14Exikad9FA/0g+Gpik2Rgr9eJ38fRgo=; b=CdxYW1p5MLUQVGtv7XHTeaYU3w0jQdZzBFLrW68DBLZ1Tvhsikvu9pA4dN2HoFDshV 1FOR9ml1Dmv3pm1IclF4ePO4YdQNsbdNqGJqU0WzFVdr+jvE/5Drw7MMn6TvCMTXO/F1 Addmv6aRyHbGsDzUIhjM6r2JoahlSAm7AXEr1ThlT9bjM8un+/1D57ATRld9vlAZniVD zTTEUbJOvlC1sKu4zfRWKqfmkraXLKhhFZPXrh65OrWuIgOLq21+4iI0nhxWjppoNGxq 8Z3tuuJvajRzlmiCKa1TiLtDAMK0VR5x3xf+4ufjnLQrhnCY0xhClAeXT2INfzBFnowd A8lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LSkPoAgh; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ay1-20020a170906d28100b0099bcd480030si6201589ejb.879.2023.09.23.16.31.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 16:31:59 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LSkPoAgh; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 57240385CCBC for ; Sat, 23 Sep 2023 23:31:33 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id F2FF63858CDB for ; Sat, 23 Sep 2023 23:31:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F2FF63858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-578bb70ad89so526468a12.0 for ; Sat, 23 Sep 2023 16:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695511865; x=1696116665; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bmxHKWwio2cPx8wisdgkTFAbPMGjyUgA+59rIRdoEsw=; b=LSkPoAghoq29M6xXdveY4pWpOdvqAjOu5mS7e8nPLuuxq2N5RM9dLG9yM/KcDGlGxm O5QCNNariJhTK4Sb7+jaEqqKlU7VC+9kOCPVHpe/OjSJ0V9CMqSyA6FwO/+b2XStTKT/ 8UZgxkzw280+ifjBPh5mPtkkgPZapAhF+GxmCRW7PSuBOyYKxKFeJe3Du4RCGJXEYrvP 3U0dovS7DRLtq9L5znHDr667sEGsaJwMA8qVCRtqSxRYD8j4EKNUwJy2VhCnqfyGCKVl HF3w18Vu7FWJJsZKlD2ojhw3zwQJKZERWxAGPxmlmMIzRrd/1rfywuTuroYpg1Ts5kX4 qZ8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695511865; x=1696116665; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bmxHKWwio2cPx8wisdgkTFAbPMGjyUgA+59rIRdoEsw=; b=QPSryBXJXYtJxWTFiCUlsceWaogUwkudb+tdSgBwerJ2DbpUKqfLn13N3aLAxeEWev xuE9kEeKmSConoqE/c8URZexStasOM4i3RisMLvKt1ZyXwI0i5016JTtuAcGBrKsaZbV MjoeTJNBqjBChX/MOrquaJMfog3aHXDQjEUkQO6U8HU3l3f/9Va4UQwIM9DzFPepwplU sG6YDQBCFSNFSefNrnS+olRvhmO5x1E/v+IE/Iu5GnJ70hO3wfXwsaVO3/mtf5DbHa5I KjTBqbi/EDJXBtfXFffjp6aCQVi9XIW5zpj8m8yszPNcLIZhqnTfQj8x5hyCupQMrqNQ nRdQ== X-Gm-Message-State: AOJu0YzRktl5qtXeeF24cqyyM9pFz0Uv2HPipHJfkwjJPUIqQgV58nZx U6y9YSCujVJuvP97D8jvkE3Ec91TlG/Wgg== X-Received: by 2002:a17:902:ecca:b0:1c2:c60:8387 with SMTP id a10-20020a170902ecca00b001c20c608387mr3812029plh.0.1695511864772; Sat, 23 Sep 2023 16:31:04 -0700 (PDT) Received: from liushuyu-p15.lan ([2001:56a:fa55:2000:5f51:4954:51e1:8176]) by smtp.gmail.com with ESMTPSA id jw16-20020a170903279000b001b89b7e208fsm5911905plb.88.2023.09.23.16.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 16:31:04 -0700 (PDT) From: liushuyu To: gcc-patches@gcc.gnu.org Cc: Zixing Liu Subject: [PATCH 0/1] Add LoongArch64 support for D frontend Date: Sat, 23 Sep 2023 17:30:50 -0600 Message-ID: <20230923233056.1879184-1-liushuyu011@gmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777872468402649912 X-GMAIL-MSGID: 1777873106908795800 From: Zixing Liu This patch adds the LoongArch64 support for GCC D frontend. The runtime support is submitted as a separate patch here: https://github.com/dlang/dmd/pull/15628. You can find more information about the LoongArch architecture on this website: https://loongson.github.io/LoongArch-Documentation/README-EN.html. Zixing Liu (1): gcc/d: add LoongArch64 support for D frontend gcc/config.gcc | 1 + gcc/config/loongarch/loongarch-d.cc | 82 ++++++++++++++++ gcc/config/loongarch/loongarch-d.h | 26 +++++ gcc/config/loongarch/t-loongarch | 4 + .../fail_compilation/reserved_version.d | 98 +++++++++++-------- .../reserved_version_switch.d | 12 +++ libphobos/configure.tgt | 3 + libphobos/libdruntime/gcc/sections/elf.d | 2 + libphobos/libdruntime/gcc/unwind/generic.d | 1 + 9 files changed, 186 insertions(+), 43 deletions(-) create mode 100644 gcc/config/loongarch/loongarch-d.cc create mode 100644 gcc/config/loongarch/loongarch-d.h