From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 7592F3858D39 for ; Fri, 11 Nov 2022 00:07:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7592F3858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.96,155,1665475200"; d="scan'208";a="86478134" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 10 Nov 2022 16:07:10 -0800 IronPort-SDR: aDW0c8tyKx8SImFk1e5CzvUXIgIskbguXXTIkbiE1RjPc0hNzszxZ7nq9RlPHQjJSN8I3Mxm0O ytgLuV9ImRGzLlcPKeQB0mxugxNRzAFTMGdDIphsoR2YDbQ59kvreYNacLGy6Zq/EbvGHL72Fv SE5T6u2crMPodJXISZMVcKcsz5sKbXpTOZmQeO5275dXTsroe0Q3pTfPwwk8FwThwW6+oM5y4O 4qpa7GkOm7zcud8U/YslP+BBUQHvFgSZ89hT+TmKYvkQxW/+kV3lzuMQXdxUCLwDSA2471ObNA eq4= Date: Fri, 11 Nov 2022 00:07:04 +0000 From: Joseph Myers To: Xi Ruoyao CC: Lulu Cheng , , Wang Xuerui , Chenghua Xu , Xiaolin Tang Subject: Re: [PATCH v2 2/4] LoongArch: Add ftint{,rm,rp}.{w,l}.{s,d} instructions In-Reply-To: Message-ID: References: <20221109135329.952128-1-xry111@xry111.site> <20221109135329.952128-3-xry111@xry111.site> <5c9131fe-4bcb-1713-6716-a3e9930d8580@loongson.cn> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1152306461-76622825-1668125224=:625263" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3110.1 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP 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: ---1152306461-76622825-1668125224=:625263 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT On Thu, 10 Nov 2022, Xi Ruoyao via Gcc-patches wrote: > Joseph: can you confirm that -ftrapping-math allows floor and ceil to > raise inexact exception? The man page currently says: > > The default is -ffp-int-builtin-inexact, allowing the exception to be > raised, unless C2X or a later C standard is selected. This option does  > ^^^^^^^^^^^ > nothing unless -ftrapping-math is in effect. > > To me it's not very clear that "this option" stands for -fno-fp-int- > builtin-inexact or -ffp-int-builtin-inexact. The -ftrapping-math option (which is on by default) means that we care about whether operations raise exceptions: they should raise exceptions if and only if the relevant standard permit them to do so. The combination of -ftrapping-math with -fno-fp-int-builtin-inexact means the listed built-in functions must not raise "inexact". If -fno-trapping-math is used, then we don't care about whether exceptions are raised or not (for any floating-point operations, not just those functions). So given -fno-trapping-math, there is no difference between -fno-fp-int-builtin-inexact and -ffp-int-builtin-inexact. If -ffp-int-builtin-inexact (default before C2X), we don't care about whether those functions raise "inexact" (but still care about other exceptions and exceptions for other operations, unless -fno-trapping-math). -- Joseph S. Myers joseph@codesourcery.com ---1152306461-76622825-1668125224=:625263--