From patchwork Thu Feb 23 09:29:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenglulu X-Patchwork-Id: 60866 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp219292wrd; Thu, 23 Feb 2023 01:30:29 -0800 (PST) X-Google-Smtp-Source: AK7set9Q9ysyy74LDAoJlk6jZnEvTiQf17HtEQhRH8V7S/3HunpB/haPdlDhkR9X/d1OerY05OFu X-Received: by 2002:a17:906:856:b0:8b1:78bc:7508 with SMTP id f22-20020a170906085600b008b178bc7508mr19756520ejd.20.1677144629599; Thu, 23 Feb 2023 01:30:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677144629; cv=none; d=google.com; s=arc-20160816; b=lVyEhrZ/jznkfJEcSICBdjMx/oK/RPaMz/bHqvn1sHv4ElCqmio944PnuEtZl2jN54 Kms8KXmBZytsbcMIiW/K9QpR6PkNyJchJEq4J3FdaWbwxrobPZPRgMmcZ6AlfTUvOKMX 9d4m5vTuhfOiC06O5e9sQeNJcntYB7u7NdP6Ne/zfXjV/x3t80tO7NpCzEnXFIDYp8sC AMuu6YoC2QUocW8uiuiekILwc1Jb3GxQcA1xTmS4fTc6UULEZ+U297B70n2/mojj27mA 0xi3KPLoz4gf+JcOI20oibHogh3apm757SLlirAd221IgEAqemd7by5awy291aKTHs3C PtCg== 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:message-id:date:subject:cc:to:from:dmarc-filter :delivered-to; bh=g2mybyGRqk9iRIdObf8GWvFAkpkZQ+Yf5FQ8rd94RyI=; b=G5J78qbZYjC+bFXmlzm2Pf8whRWHgyzk5qB8EiTRBj5pZRavHBNasL/TVPYUatrAgj XHLwiQHAjJzYxmQFbJkSWgoBkFnM/uTvbACcJtK2KEj2U/TjCW2WlkgABPP1r8a1R7fS ci4lMWhqJoIgOtnEkJV2gZDAtXGDCUixrRhtwNnQhqXfDVPXYCZx+/4ySEETDNgSig0V SjsMJG0MrrpSt71WS81Ldc1hUZmEzb7QqahXe07JvQO4E7pmhrCWpKw+UoV3pWf61tGv 5oQh/wDICySTNToPZmVX20tfCjqblN6PZHJ4oB5dGybtr7pVut9fv49msg8xVjeOTG/W 979w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id td6-20020a1709078c8600b008eb0766f2dbsi1988861ejc.524.2023.02.23.01.30.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:30:29 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 465BA385843D for ; Thu, 23 Feb 2023 09:30:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id B20B03858C5E for ; Thu, 23 Feb 2023 09:29:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B20B03858C5E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [10.2.5.5]) by gateway (Coremail) with SMTP id _____8Ax69kOMvdjHRMEAA--.2572S3; Thu, 23 Feb 2023 17:29:51 +0800 (CST) Received: from 5.5.5 (unknown [10.2.5.5]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxTuQJMvdj4I05AA--.4240S2; Thu, 23 Feb 2023 17:29:49 +0800 (CST) From: Lulu Cheng To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, Lulu Cheng Subject: [PATCH v2] LoongArch: Change the value of macro TRY_EMPTY_VM_SPACE from 0x8000000000 to 0x1000000000. Date: Thu, 23 Feb 2023 17:29:36 +0800 Message-Id: <20230223092935.579700-1-chenglulu@loongson.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8DxTuQJMvdj4I05AA--.4240S2 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7WFW3JrWUCFWUCr1rKF1Dtrb_yoW8Gw4rpF W5ta4fKay0yF43uw4Utw17Kw1UJwnYvF1DtayUCryF9a4UKr1jv3WDKF4a9FZrXr4kAw43 Xr10krWj9ay5C3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b7kYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26F4UJVW0owAS 0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxC20s 026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_ JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14 v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xva j40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJV W8JbIYCTnIWIevJa73UjIFyTuYvjxUrNtxDUUUU X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, 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.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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758613607149275512?= X-GMAIL-MSGID: =?utf-8?q?1758613607149275512?= The PCH mechanism first tries to map the .gch file to the virtual memory space pointed to by TRY_EMPTY_VM_SPACE during the compilation process. The original value of TRY_EMPTY_VM_SPACE macro is 0x8000000000, but like la464 only has 40 bits of virtual address space, this value just exceeds the address range. If we want to support chips with less than 40 bits virtual addresses, then the value of this macro needs to be set small. I think setting this value small will increase the probability of virtual address mapping failure. And the purpose of pch is to make compilation faster, but I think we rarely compile on embedded systems. So this situation may not be within our consideration. So change the value of this macro to 0x1000000000. gcc/ChangeLog: * config/host-linux.cc (TRY_EMPTY_VM_SPACE): Modify the value of the macro to 0x1000000000. --- gcc/config/host-linux.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/host-linux.cc b/gcc/config/host-linux.cc index a891651a7b6..d1aa7ab28ca 100644 --- a/gcc/config/host-linux.cc +++ b/gcc/config/host-linux.cc @@ -99,7 +99,7 @@ #elif defined(__riscv) && defined (__LP64__) # define TRY_EMPTY_VM_SPACE 0x1000000000 #elif defined(__loongarch__) && defined(__LP64__) -# define TRY_EMPTY_VM_SPACE 0x8000000000 +# define TRY_EMPTY_VM_SPACE 0x1000000000 #else # define TRY_EMPTY_VM_SPACE 0 #endif