From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id 11FE7385B53B for ; Thu, 16 Feb 2023 13:49:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11FE7385B53B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-lf1-x12c.google.com with SMTP id y25so2818942lfa.9 for ; Thu, 16 Feb 2023 05:49:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rt2QT+v02LT6ABLD0hvq5TU2O2gNKeWMTg0Q1itG4EU=; b=ldTaGn6DcxBw8qxP2S0hh09QcCUEmYYU6Yl66QsxXjgLsrTuJeuqsUTaRkOWPzHRkV B/RMRvyMzhbJ3cHGVvEzIseLayIQDAg0uokDFXibXtzvANKC7nTPvm8u9jeOMxKzsw8N RrPqXdqAqeUfPpo/Bu+4sNJurq89VKfMB/swOtGArO+boG3MTfjqqQTqwQQnc+WF+j0L m2Jb9Pg15WF2KOwB/X7i+4q1U7bgDEVP9Y78gKzIPQ7+XxbQQf7/5CH9hLDfczRQLeoG 3LtUmLm/h/vm9uzUxe8if62YIsX3hLv+SjDHcYc2dxDXiiPCX1lneiu85Ok++ap1m0ED Bgdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rt2QT+v02LT6ABLD0hvq5TU2O2gNKeWMTg0Q1itG4EU=; b=uyQkVihP9G48eSCOCV35onCUEH/Ip+qhrxXuBOuwtFno3T1RVL/trPYHMEGxfubhAi phgcIAgLTGp8ObvFY5RxKPn+DZfFtHt4bfCSyqpWd6Ia/SWiuWNbpDVTIC5UZ+svQdiH 6BKiC1PuOw/mu+lC67BpsPNpdgqWcXs8xhOBQ2/T3KJ92a2d7Es92qa47xpYhF2TR8Ur mbl7fseOGkkYubBOkF5XufBEAMbAvW1EniQw/IfYEe7gveOu/bIPZsxdUlHkueVNx9V5 BRu8CGSWx4zd0FFRozD3np+HI1d8tkfdgYPVmHtwCxv6R2lgWXWQ9kPCpXSqRrHCOHrA tn7A== X-Gm-Message-State: AO0yUKWomPUUJ8fJTPUR3R/IZ2133kVzcEvU0LSjNr8dyKOPwn5ZMALN dGsxi/CN7Hk33aTWex+bcSRGuWB2tc8HnGV4GyUs/FzndfjMk8VP X-Google-Smtp-Source: AK7set9dfxoWdpPwqLvki2hgu/Mfoamoo3+1G6v/1LNs/zYn+pV4kvIoUvuri+nSehWO40NKjz8r3BZMkjAqfPDcrSk= X-Received: by 2002:ac2:4432:0:b0:4d5:ca32:9bd7 with SMTP id w18-20020ac24432000000b004d5ca329bd7mr1667100lfl.3.1676555341407; Thu, 16 Feb 2023 05:49:01 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Kito Cheng Date: Thu, 16 Feb 2023 21:48:50 +0800 Message-ID: Subject: Re: [PATCH] riscv: Set __GLIBC_FLT_EVAL_METHOD to 0 if __FLT_EVAL_METHOD__ is -1 To: Wilco Dijkstra Cc: GNU C Library , Joseph Myers Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: For anyone who interested on this issue, but not tracking LLVM community: LLVM has created a bug to track this: https://github.com/llvm/llvm-project/issues/60781 Hi Wilco: According to the comment in the flt-eval-method.h, it says its mapping -1 to 2 is because it's the most conservatively safe assumption[1], so that's why I consider fixing that for RISC-V port only. I am happy to send patches to update the generic flt-eval-method.h if there are other maintainers that think it's reasonable to change the default mapping in glibc. [1] https://github.com/bminor/glibc/blob/master/bits/flt-eval-method.h#L23 On Wed, Feb 15, 2023 at 10:13 PM Wilco Dijkstra wrote: > > Hi Kito, > > This looks like a recent bug in LLVM - even with -Ofast compilers continue to > use float and double for evaluation (obviously!), so float_t and double_t should > not change (which may break ABI if some code uses -Ofast and some doesn't, > leading to incompatible float_t/double_t definitions). > > So this should be reported to and fixed in LLVM, and if we want/need to work > around it in GLIBC, it should be done in the generic flt-eval-method.h header > so that it works on all targets. > > Cheers, > Wilco