From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender4-pp-o90.zoho.com (sender4-pp-o90.zoho.com [136.143.188.90]) by sourceware.org (Postfix) with ESMTPS id 83EC13858D28; Thu, 25 Jan 2024 21:04:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 83EC13858D28 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=zoho.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=zoho.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 83EC13858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=136.143.188.90 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1706216664; cv=pass; b=cDf+r6n62l3638qBHJ/lDxhgB0b1NGY2+5fDfvD8fptbFpqlwXsIuXlx93xLRu7qn45by4j+8BV7a29FgZIMh4I8Bd/aezHpNiT9ZtSnSc9YsBNlVMY2wSbaSTzK98aRc+ZTVY4hmzJMY69GtZQDqApuiUFR4BTV3Hx2NvXbdVc= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1706216664; c=relaxed/simple; bh=kJZYoQRA1J3n7KawSRsJ3OETlvW8f/LinT5g8N9HkZo=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=tZt6DNBqbdcxU/xA5jRtjCpiZAqSt9ppKl0D5bWuv2yfykMZiTgrxkWausdKO4DW1xM5UbpJXPhlWcCWNTdRouGE6wFAmVPftR47qqNwHip+FpkXfp7a105y6Pj9GIDAzxQzNYx3uQBfjeUWrHjcZztI6kmOyVnuzYKv5o7weB8= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1706216655; cv=none; d=zohomail.com; s=zohoarc; b=CQciLiZOPRfm5nGhB5e1n20RovEePB2hAr6yFM1UhPC9WEnCgOIRna2+7drM9a1cZzAkmplqihpJj61og/+lVAjK1/eKPqQKn1WOLSE/ef9UK+q++xsbf6Ih/1GubsuPHy6wiqMqoSkKvh4HdSS1E1MAhCMdDCvIkH7UV/Rz7X4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706216655; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=kJZYoQRA1J3n7KawSRsJ3OETlvW8f/LinT5g8N9HkZo=; b=EGXQUoAbqYX+G6P7VSgUghoR8xmYdzjfvipDI+TW9QpqGz2nC4D76qe9sE1hOdvcdF+97Am7aCTOFveWGdTYkh3aF5LYk1c1gEjF8eBioBj7dOzJ/zs+HvgvL03laTZsZzSnG/aS5xsOiQkYoSnHvi4cFehC114QRA5qrNVDpK0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=bouanto@zoho.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1706216655; s=zm2022; d=zoho.com; i=bouanto@zoho.com; h=Message-ID:Subject:Subject:From:From:To:To:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Feedback-ID:Message-Id:Reply-To:Cc; bh=kJZYoQRA1J3n7KawSRsJ3OETlvW8f/LinT5g8N9HkZo=; b=SHSQG+4A1qD0Dn3qhjAFfah7D24oNzj7oS1ihbXFvC/lxR/im1QBAF2DIqbC2uuD VmKDufau2M04aSaLFxK8HRN4oZ/gWYIx9KDdjXTf6dDxqMIKpWftgpIIGQ0LOSoa9Du u7bTTTyoSG1apr4qg3jzltn4daEP4F2dyKjQAmXM= Received: from [192.168.1.172] (38.87.11.6 [38.87.11.6]) by mx.zohomail.com with SMTPS id 1706216652669777.832188199159; Thu, 25 Jan 2024 13:04:12 -0800 (PST) Message-ID: <9fbf4189ba565f43ba58e678d4673ab1ec6e51a7.camel@zoho.com> Subject: Re: [PATCH] libgccjit: Fix float playback for cross-compilation From: Antoni Boucher To: David Malcolm , "jit@gcc.gnu.org" , "gcc-patches@gcc.gnu.org" Date: Thu, 25 Jan 2024 16:04:10 -0500 In-Reply-To: References: Autocrypt: addr=bouanto@zoho.com; prefer-encrypt=mutual; keydata=mQENBFOSMLQBCADO5aw6Ys8thMQUNzrwAnfJX2wbgWiz0pQ01DjYj22eeIpChkoZn6LWdt4dieq30u2rFi/yQzJ02foHwI2+aL9rU6xz/x4TwqyRJQGMOqklNc3R+pdXmH4WDQkQDWmLxvc07vu+zb8Tx5A6pMDh4J2ncCEhLEUcH39Yq/yg4eBnFwUX6N7kakvHrnScGNqhnSFCacoJeMJUAR+1G7VBSBd++jmnHLnx3mj7QkRZVECJUw2zqiv1yReCC6GU4SvqLjdqm5ZGeoWOqD/NHjBRoEeOVjzp6M/qOjjWRbkJVqmvgfcD8UytSSqqboR35YFT4L+rZt2ri3T12MJb3i5syCAXABEBAAG0IUFudG9uaSBCb3VjaGVyIDxib3VhbnRvQHpvaG8uY29tPokBVgQTAQgAQAIbIwcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAFiEEOELC4Uw1Jeb66YE6RVeGAwR4zcEFAlz4QM4FCRLMEZoACgkQRVeGAwR4zcFBQQf/afttJrA/puADQZhrDfkgr0MFvq6iB+GCy1b8BkXimk1TOXTPt87YLehSeijNu3JkYhl5eRc87BNfU9J87KfI/KIy6hZxqlDXk16FhW9bw/7wYEA0hpb3MUn7xLElXDT0ZHaD+KTe8Oun7qfzgx5RlL6r/WODf3CkSpO085R/rfeBqDEx9mVlhDWgq6Az3CZoD+3CqiCKVqmDuHTWz4kwrd9AM5eVcLvvLKnZIdoIp+G5Ao6BvaGlZyfenN1iOSjLy2NXNt4MnUt0lUYEP5KSIIRhHQ8xkUbj7eWUmaahkxhNb3fH3sAPwGnRZrPpb4rgYzNmSk63wWMh9M2xk+rLb7kBDQRTkjC0AQgAumZzsAV/UFWI+dpzebQfma36kKYZZFuseant5sq/HWP553XQ/U6ttJiKyN5MpCqtxvCAoRplf42YhlHuFqgf73WJxoJ6Y+sdyqoBSwlR+ gzAneAmsa8gmmY0wawH0Z2leazjKuS7mJjVEQZg0ZGsiCVRGeRnDqFGzDEzDc9ngWKSoTq0fKzlGy1X85OrtmUrvEbhSo6HP+FoeunHkIqrxu3w3vDoFEXxVQlKI6V3I4nCz5n6DB8WR3L7nsiiTnOiGirPw1ngvWFLW86kkA4FJpayc8Xl3va3SLY+2y4yuROboX2DVI4AC/Qeug/mDiBicPxkP6YfUartQRMe6obkEQARAQABiQE8BBgBCAAmAhsMFiEEOELC4Uw1Jeb66YE6RVeGAwR4zcEFAlz4QRsFCRLMEecACgkQRVeGAwR4zcE56ggAgTgrJInBKC+7552Dpccuo6Clh3wZfjlNLv9/6r5lKEbaNzaTrfhPiAP4WgnluIUmj8amOFLFJpj+BAVNOXpZ4D2R3o9ch8z7fot+fW4Yw+PKIxH4I2xEys8ndoEB3aiQwHjKcGIhkIU7uyMJFQr2aWjdTY0gmXw0YZueHOSLgo7uX4XKxB8fEO/yto/Tff2YBAAq+AtNwt+Gh5YS9rZw7rwUTWMi84yVOlc+zRE79E9NJkvdTwX7IJYo64VzIRNfgHsn7QNdVzuM1XIFHl+Glk6cIlI8s6BO7nEoCn3hTF104fQTAO3fEs+XXZOKXo2lk8faowEoPq5r58StrV0nyg== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 MIME-Version: 1.0 Feedback-ID: rr08011228b26d4669abefffb65ac61b6e000073a1c7d22af18a7f43fba156e5a748f296ac018bd97eaa94b03c:zu080112266cbc917d3be057b794ec32510000f5125e78b8e4926b9c0f358092e281cc0b6fe6982b29e0e2:rf0801123115a5cca85ea52ad4493ff0fa00001c107cff655c099f31e921084bcb6740f6757454af7d087174e2d522251458a2672501:ZohoMail X-ZohoMailClient: External X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Thanks for the review! On Wed, 2024-01-24 at 13:10 -0500, David Malcolm wrote: > On Thu, 2024-01-11 at 18:42 -0500, Antoni Boucher wrote: > > Hi. > > This patch fixes the bug 113343. > > I'm wondering if there's a better solution than using mpfr. > > The only other solution I found is real_from_string, but that seems > > overkill to convert the number to a string. > > I could not find a better way to create a real value from a host > > double. >=20 > I took a look, and I don't see a better way; it seems weird to go > through a string stage.=C2=A0 Ideally there would be a > real_from_host_double, but I don't see one. >=20 > Is there a cross-platform way to directly access the representation > of > a host double? I have no idea. >=20 > > If there's no solution, do we lose some precision by using mpfr? > > Running Rust's core library tests, there was a difference of one > > decimal, so I'm wondering if there's some lost precision, or if > > it's > > just because those tests don't work on m68k which was my test > > target. >=20 > Sorry, can you clarify what you mean by "a difference of one decimal" > above? Let's say the Rust core tests expected the value "1.23456789", it instead got the value "1.2345678" (e.g. without the last decimal). Not sure if this is expected. Everything works fine for x86-64; this just happened for m68k which is not well supported for now in Rust, so that might just be that the test doesn't work on this platform. >=20 > > Also, I'm not sure how to write a test this fix. Any ideas? >=20 > I think we don't need cross-compilation-specific tests, we should > just > use and/or extend the existing coverage for > gcc_jit_context_new_rvalue_from_double e.g. in test-constants.c and > test-types.c >=20 > We probably should have test coverage for "awkward" values; we > already > have coverage for DBL_MIN and DBL_MAX, but we don't yet have test > coverage for: > * quiet/signaling NaN > * +ve/-ve inf > * -ve zero Is this something you would want for this patch? >=20 > Thanks > Dave >=20