From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 41FE93858C2D for ; Tue, 27 Sep 2022 11:44:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 41FE93858C2D Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1664279075; bh=VcWlvvEOlULOfFaLO8Ac7rhZSFHB/77lBZKlYso6lpE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=TOy9xl7E+2SDGkj4VW3DbIJg+rsCZTzvY5rqIW5vqkr0hf+F/X18ZNZ8/gagh9f1Z fD2DXOxHjmgd6dFcUoJsqD69T28qsmKKgHapIWV3fAEKVltggfXqcZPszkM8bWrxmT U730KINCbbhy+YhYCkcUi9pYohYOrjC9sR7mJqv0= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 8330B6680E; Tue, 27 Sep 2022 07:44:33 -0400 (EDT) Message-ID: <94830aafc09b8cfd809b7a29163377842112112b.camel@xry111.site> Subject: Re: [PATCH v2] LoongArch: Libvtv add loongarch support. From: Xi Ruoyao To: Lulu Cheng , gcc-patches@gcc.gnu.org, mliska@suse.cz, dmalcolm@redhat.com Cc: xuchenghua@loongson.cn, i@xen0n.name, qijingwen , Caroline Tice Date: Tue, 27 Sep 2022 19:44:31 +0800 In-Reply-To: <20220927074928.804896-1-chenglulu@loongson.cn> References: <20220927074928.804896-1-chenglulu@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP,T_PDS_OTHER_BAD_TLD 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: On Tue, 2022-09-27 at 15:49 +0800, Lulu Cheng wrote: > =C2=A0#if defined (__CYGWIN__) || defined (__MINGW32__) > =C2=A0=C2=A0 if (VTV_PAGE_SIZE !=3D sysconf_SC_PAGE_SIZE()) > +#elif defined (__loongarch_lp64) > +=C2=A0 /* I think that under the LoongArch 64-bit system, VTV_PAGE_SIZE = is set > +=C2=A0=C2=A0=C2=A0=C2=A0 to the maximum value of 64K supported by the sy= stem, so there is no > +=C2=A0=C2=A0=C2=A0=C2=A0 need to judge here.=C2=A0 */ > +=C2=A0 if (false) I think "if (false)" can trigger some compiler warnings... Still not sure if the maximum value is always correct (+ Caroline for a confirmation). If it's correct I'd suggest... > =C2=A0#else > =C2=A0=C2=A0 if (VTV_PAGE_SIZE !=3D sysconf (_SC_PAGE_SIZE)) if (VTV_PAGE_SIZE % sysconf (_SC_PAGE_SIZE) !=3D 0) > =C2=A0#endif --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University