Message ID | 20231020071506.27021-1-chenglulu@loongson.cn |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp879008vqb; Fri, 20 Oct 2023 00:15:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF82DM1allSUvYf+uMmR+03VaqPGxsstXTYtMDufU0CjSa1BzocwS/xI8HUVX2oPBfO1JOu X-Received: by 2002:a05:6214:c65:b0:630:7d0:56f4 with SMTP id t5-20020a0562140c6500b0063007d056f4mr989905qvj.49.1697786156134; Fri, 20 Oct 2023 00:15:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697786156; cv=pass; d=google.com; s=arc-20160816; b=d41l10euo39LFEoZhcwhD7bl0T5sfX5N010RB7UXU3Y8Oq33P9HCFO5tEQLX+XJOFv MatdJG3ZcS7bz4NbCkVEDa2PbVPKAQiY87du1bRyAnBSwUiSJTV3+uEFYaeU2krgKFKU yWAwIHhEZpsaGOB+ZWsVUeRL5pkm5exY+yzfn+zUkOH3uBtJTNfupy4LvLFUiC2zcL/D TVaovsP/065gniDuDi7sP147k8Hw+KY8fGQOtv9Kk5mmbkMpmlmWix7Cb9CIKMbBIqKl U1gFV32DBgGeJ9mJuREy2WgWMvNfsR0HFpg7FDY6NuxU5N5zoVNtVwNaXQ0Qx0NnLLgn 6PLg== ARC-Message-Signature: i=2; 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:arc-filter :dmarc-filter:delivered-to; bh=4l6RhW3+e++gIRsgl6nN+TihOBdsXc8jj4GCKkBlEGA=; fh=kLXYvQYlFoGM+V705nfHVJAr1G8Exwjn4Aw52UExiO4=; b=W3Qsv5ESVz7xManFy399N85u4zNeFESw4VKDPXJ8JNXt5F/UrKU3k0n2vA9boIghoV 2RwlInJQfkTq4tECTaduUG+reKi1O+a8Nn7NcvoZNkX7GP4z7mUA6PsP/+KGmwqVkgF4 /dA9DA7Nx5fJClvbJdjVBNnRjOWlHr9iN6yxoB+v5uais4YixeDgHIpfW7ydRX3zpzc2 70awgrAKdXGfxCgzTjZ/7Hi/hQpWQyMx/jZcywxHnm4LkSDHqW70FVTSAh3J7anVLnfR GPp4gpDwpmJ43iQ+JcNsTMjrQfoyouKc579o8c6T/rw0G3+P4HSkHBN6puld4L1y9g+C mTVg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); 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 ei6-20020ad45a06000000b0065aff063eafsi962212qvb.538.2023.10.20.00.15.56 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 00:15: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; arc=pass (i=1); 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 E33623857717 for <ouuuleilei@gmail.com>; Fri, 20 Oct 2023 07:15:55 +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 26A963858D1E for <gcc-patches@gcc.gnu.org>; Fri, 20 Oct 2023 07:15:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 26A963858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 26A963858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697786132; cv=none; b=uyPzNfiJmxzsJdEIxBifJv0mq7YsmQ8C2tllyNHyGwGGx6qRft14YP7oJG+f97IeobTZH+6Bp64ouXI7bqrgnIOibOTzE52Xv0PQYfzhxXS65x7b/KSdyC0qdv21VCTormynLfkU6xQmGIRqteFzg1Tje1qehFKoyS5c+kkpupc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697786132; c=relaxed/simple; bh=p+HqNwTJJ+3zYnv617BbeotVEB54cLW+j1xRkN4X6qQ=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=kYcLyOSlB/F+gkFCsRwhpNT6iXMao5rr9qGzBaTPMEwoJsPacjrqJJa7NqDF8KbSe3KY0pDm2TfH441ub682qv3LR/21/5Kpz9LV+831swmWHTF6wFb+FodjAB9cN5Ey3V+2FMOe3lZcQWoQWfq4SjF9eDzPsSM7n5XM+w2Ofec= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail.loongson.cn ([114.242.206.163]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <chenglulu@loongson.cn>) id 1qtjjB-00025W-Nc for gcc-patches@gcc.gnu.org; Fri, 20 Oct 2023 03:15:29 -0400 Received: from loongson.cn (unknown [10.20.4.107]) by gateway (Coremail) with SMTP id _____8Dxl+gCKTJl3GozAA--.63926S3; Fri, 20 Oct 2023 15:15:15 +0800 (CST) Received: from loongson-pc.loongson.cn (unknown [10.20.4.107]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dxnd78KDJl2wcsAA--.29548S2; Fri, 20 Oct 2023 15:15:14 +0800 (CST) From: Lulu Cheng <chenglulu@loongson.cn> To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, Lulu Cheng <chenglulu@loongson.cn> Subject: [PATCH] LoongArch: Define macro CLEAR_INSN_CACHE. Date: Fri, 20 Oct 2023 15:15:06 +0800 Message-Id: <20231020071506.27021-1-chenglulu@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Dxnd78KDJl2wcsAA--.29548S2 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBj9xXoWruw18tF1DtF18Wr1DJFy8Xrc_yoWDWrXEqa 47ta4kGr4DCayUtwn09FWFkw15X3WktFnYvFyDKF4xCFy5XrsxArW8Way5Ar1YkrZ8Xa15 Jr4vkFna9r1aqosvyTuYvTs0mTUanT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUb7AYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4UJVWxJr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jrv_JF1lYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x 0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E 7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcV C0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF 04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7 CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU1QVy3UUUUU== Received-SPF: pass client-ip=114.242.206.163; envelope-from=chenglulu@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=-13.7 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.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780257816372407082 X-GMAIL-MSGID: 1780257816372407082 |
Series |
LoongArch: Define macro CLEAR_INSN_CACHE.
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
chenglulu
Oct. 20, 2023, 7:15 a.m. UTC
LoongArch's microstructure ensures cache consistency by hardware. Due to out-of-order execution, ibar is required to ensure the visibility of the store (invalidated icache) executed by this CPU before ibar (to the instance). ibar will not invalidate the icache, so the start and end parameters are not Affect ibar performance. gcc/ChangeLog: * config/loongarch/loongarch.h (CLEAR_INSN_CACHE): New definition. --- gcc/config/loongarch/loongarch.h | 3 +++ 1 file changed, 3 insertions(+)
Comments
Pushed to r14-4836. 在 2023/10/20 下午3:15, Lulu Cheng 写道: > LoongArch's microstructure ensures cache consistency by hardware. > Due to out-of-order execution, ibar is required to ensure the visibility of the > store (invalidated icache) executed by this CPU before ibar (to the instance). > ibar will not invalidate the icache, so the start and end parameters are not Affect > ibar performance. > > gcc/ChangeLog: > > * config/loongarch/loongarch.h (CLEAR_INSN_CACHE): New definition. > --- > gcc/config/loongarch/loongarch.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h > index 22912018a0d..0c15c79bc4c 100644 > --- a/gcc/config/loongarch/loongarch.h > +++ b/gcc/config/loongarch/loongarch.h > @@ -1239,3 +1239,6 @@ struct GTY (()) machine_function > > #define TARGET_EXPLICIT_RELOCS \ > (la_opt_explicit_relocs == EXPLICIT_RELOCS_ALWAYS) > + > +#undef CLEAR_INSN_CACHE > +#define CLEAR_INSN_CACHE(beg, end) __builtin_loongarch_ibar (0)
diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h index 22912018a0d..0c15c79bc4c 100644 --- a/gcc/config/loongarch/loongarch.h +++ b/gcc/config/loongarch/loongarch.h @@ -1239,3 +1239,6 @@ struct GTY (()) machine_function #define TARGET_EXPLICIT_RELOCS \ (la_opt_explicit_relocs == EXPLICIT_RELOCS_ALWAYS) + +#undef CLEAR_INSN_CACHE +#define CLEAR_INSN_CACHE(beg, end) __builtin_loongarch_ibar (0)