From patchwork Mon Aug 14 03:57:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yujie X-Patchwork-Id: 135116 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp2504726vqi; Sun, 13 Aug 2023 20:58:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6rqoP3+avLushhzJMKlkovnoIfKNhcQ0oEq8Ugb+Yy/cWVcFAdR7Z6KcMfmJ4okc6kIw3 X-Received: by 2002:a17:906:5358:b0:993:e809:b9ff with SMTP id j24-20020a170906535800b00993e809b9ffmr6971241ejo.21.1691985536703; Sun, 13 Aug 2023 20:58:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691985536; cv=none; d=google.com; s=arc-20160816; b=V5zhsS0et7TqrePvFWOH4HC5g926I7Y9Wn5obZxFJgOh5PGcyxW+Nvk3EU+eXZmsYr DrdM9tX+F86HM6KyafqKMd6aM1Nkd7JXkSr2aSgdmHPX8A8xZqbWFgT6EFsAaNGFG77u FFN7Ja1parTr05Q2t71jjbHQdw8BmMzTjIqN4ym45DG+ZQgmrNuR+pudZ8B8KMdSaaNk qQ+ukKxoAwtF189so7mbCZosH7gNn8JVcoURmTgwZyzDlKurJuMQD5pTPFqmwwshHtEH gW6bokcoWLEk/ekRFcuw+BPJZDToVZk/4209vjF1J9neIgsuVJK/wsoz/7f023y5JTUa r/uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dmarc-filter:delivered-to; bh=9KrRGksY/fmRlrbbMwiS5KURhzswTYhjNjPWhXxWT+4=; fh=IxMqdJj3G+v5QmZpidO3uwMg7Jqu8kY37TcqbgmfO1o=; b=CkGiN3ELFuvexAogVNfdsA+b2sPHf8647ELFU4hBqBz8csMdV/YcdW9Gx6TME4n9M8 PGNs70mqYalJyJ0FyiqBu0ZZ+MEPy91nxUZB4ZG+wej6cALnY8kZQiye6MRB8Qd/a0Cf Km2epdA1DiEnZIufOwSvm0D0NxLIr+yaV9S4hZ/mMPH8mDx9dsp3rvcSb/LzwqdAwO6Y vLqOz0IjDqBv8jUPUcan8YJPueFGeKOF1v6eiK50L2z9lsqWn9OIuvDQB8onegzV+BQq wHJBFTsJcK8HxDp+JIUqS9ngNXGyhl9H/kt+ylSl/zlYAWl52tAV/InivuOgNg+0WCkg lzoA== ARC-Authentication-Results: i=1; mx.google.com; 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" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id w21-20020a1709061f1500b00997dfeb04a1si7033771ejj.70.2023.08.13.20.58.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 20:58:56 -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; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A1BF9385DC18 for ; Mon, 14 Aug 2023 03:58:06 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 6F8693858436 for ; Mon, 14 Aug 2023 03:57:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6F8693858436 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=loongson.cn Received: from mail.loongson.cn ([114.242.206.163]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVOi1-0004wc-FB for gcc-patches@gcc.gnu.org; Sun, 13 Aug 2023 23:57:40 -0400 Received: from loongson.cn (unknown [192.168.100.1]) by gateway (Coremail) with SMTP id _____8Cxrusoptlk+eUXAA--.46864S3; Mon, 14 Aug 2023 11:57:28 +0800 (CST) Received: from localhost.localdomain (unknown [192.168.100.1]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxTs8jptlkPVFZAA--.25099S4; Mon, 14 Aug 2023 11:57:28 +0800 (CST) From: Yang Yujie To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, xuchenghua@loongson.cn, panchenghui@loongson.cn, chenglulu@loongson.cn, Yang Yujie Subject: [PATCH v1 3/6] LoongArch: define preprocessing macros "__loongarch_{arch, tune}" Date: Mon, 14 Aug 2023 11:57:04 +0800 Message-Id: <20230814035707.11272-3-yangyujie@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230814035707.11272-1-yangyujie@loongson.cn> References: <20230814035707.11272-1-yangyujie@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8DxTs8jptlkPVFZAA--.25099S4 X-CM-SenderInfo: 51dqw5pxmlvqxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBj93XoW7Cr43trWrur1ktF15Jr15KFX_yoW8Jw18pr yDuw4aqrs5Grn7Ganrta45Wr1DAFyxGrW2qa1ay34xCa1UGrWDZr1rtrnxXF1UZ3yYq3yI vryS93WYva1UAagCm3ZEXasCq-sJn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkFb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r126r13M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E87Iv 67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s02 6x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0x vE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE 42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6x kF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07jea0PUUUUU= Received-SPF: pass client-ip=114.242.206.163; envelope-from=yangyujie@loongson.cn; helo=mail.loongson.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-15.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_FAIL, SPF_HELO_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.29 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 Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774175426130648538 X-GMAIL-MSGID: 1774175426130648538 These are exported according to the LoongArch Toolchain Conventions[1] as a replacement of the obsolete "_LOONGARCH_{ARCH,TUNE}" macros, which are expanded to strings representing the actual architecture and microarchitecture of the target. [1] currently relased at https://github.com/loongson/LoongArch-Documentation /blob/main/docs/LoongArch-toolchain-conventions-EN.adoc gcc/ChangeLog: * gcc/config/loongarch/loongarch-c.cc: Export macros "__loongarch_{arch,tune}" in the preprocessor. --- gcc/config/loongarch/loongarch-c.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/config/loongarch/loongarch-c.cc b/gcc/config/loongarch/loongarch-c.cc index 660c68f0e06..7bee037cc4a 100644 --- a/gcc/config/loongarch/loongarch-c.cc +++ b/gcc/config/loongarch/loongarch-c.cc @@ -64,6 +64,9 @@ loongarch_cpu_cpp_builtins (cpp_reader *pfile) LARCH_CPP_SET_PROCESSOR ("_LOONGARCH_ARCH", la_target.cpu_arch); LARCH_CPP_SET_PROCESSOR ("_LOONGARCH_TUNE", la_target.cpu_tune); + LARCH_CPP_SET_PROCESSOR ("__loongarch_arch", la_target.cpu_arch); + LARCH_CPP_SET_PROCESSOR ("__loongarch_tune", la_target.cpu_tune); + /* Base architecture / ABI. */ if (TARGET_64BIT) {