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 C775C3858D39 for ; Fri, 24 Nov 2023 08:26:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C775C3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C775C3858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700814408; cv=none; b=vUfGnDdwclTocV4QGeSKe+fG0x21KyVNF2+69/zsRXallNfRsrGlpSZNAHZ2+ZEhK+WUJWIbAMuo7/dTBdLecfVR8bFXk7EuQprqUEDjkt4I2TIP6sB52Oij4gEzJOifIUc39koMKYAO/pqLujUauzSylNQlzlFGqaGGmkpa8+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700814408; c=relaxed/simple; bh=PowaoUF7mn1ftMzG8i3jW27dlkylU2xwYFMLkspPdAo=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=Gu+0TatUU4U0e0DLragrL6KmW7/f1+WY0RbeU1E75lyeJYBaRux7H1LVwPJM02+RK+fXg6ZyWzF3IPw3Nx20EiaHGeAjbGUdvJdeCBy/3IBKo1719+jaiAMjyNmTFNMr8E1FWEtr5wzgDQh67MfxdRDSmRuqflQ1ohxiAkJOvBA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1700814401; bh=PowaoUF7mn1ftMzG8i3jW27dlkylU2xwYFMLkspPdAo=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=MhQXi3ewAPTqrY7T+zvA2CiPFt+M4vXzuX0nvhkcRxfSh1keCkCpK2m0jxUDHwbKd DFkb/HDKjxPaoG91z6O614ajCeYpsYsgQbiYTxPR/l1q5Yp6yrVlOxgSoyjKGvWy1s PXT/tiMd1OvaGaf85FKyWSkmJHP+y4IPI77e7HgY= Received: from [127.0.0.1] (unknown [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 180F966B39; Fri, 24 Nov 2023 03:26:39 -0500 (EST) Message-ID: Subject: Re: [PATCH v3 1/5] LoongArch: Fix usage of LSX and LASX frint/ftint instructions [PR112578] From: Xi Ruoyao To: chenglulu , Joseph Myers Cc: gcc-patches@gcc.gnu.org, Uros Bizjak , i@xen0n.name, xuchenghua@loongson.cn Date: Fri, 24 Nov 2023 16:26:38 +0800 In-Reply-To: References: <20231120004728.205167-1-xry111@xry111.site> <20231120004728.205167-2-xry111@xry111.site> <2d1c9d59544d15ef7fba07d758431da840cc0bfe.camel@xry111.site> <9ce7e0b2-eeeb-a8c5-2cc7-e9b65b1b2a6b@loongson.cn> <0fc6f3d2536b6d2d8a1e86a5e17354f89ba7040a.camel@xry111.site> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Fri, 2023-11-24 at 16:01 +0800, chenglulu wrote: > I only saw lrint llrint in n2310 with this description: >=20 > F7.12.9.5 >=20 > "The lrint and llrint functions round their argument to the nearest=20 > integer value, rounding > according to the current rounding direction. If the rounded value is=20 > outside the range of the return > type, the numeric result is unspecified and a domain error or range=20 > error may occur." >=20 > I don't know if I'm right? There's an explanation in the linux man-page for lrint: SUSv2 and POSIX.1=E2=80=902001 contain text about overflow (which mi= ght set er=E2=80=90 rno to ERANGE, or raise an FE_OVERFLOW exception). In practice, = the result cannot overflow on any current machine, so this error=E2=80= =90handling stuff is just nonsense. (More precisely, overflow can happen only w= hen the maximum value of the exponent is smaller than the number of m= an=E2=80=90 tissa bits. For the IEEE=E2=80=90754 standard 32=E2=80=90bit and 64= =E2=80=90bit floating=E2=80=90point numbers the maximum value of the exponent is 127 (respectively, 102= 3), and the number of mantissa bits including the implicit bit is 24 (= re=E2=80=90 spectively, 53).) --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University