From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D12F93858412; Mon, 19 Jun 2023 09:29:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D12F93858412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687166970; bh=veK++VhhOtoh+XAgK06jyPAHB5RmLpCYQrexrn/Bs3s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gZjGZ0HPUs9cTnhzq9KzT+Jr1AI7Mz4uyuY2FO1WLH/G33uBPXIVtwrb2n3GjDtjp oLYvz/9ScNaeuPpkqXdJ1/JJYakr+5Di8+gTBUFXVHIsR7A8TqzGbs8p1RSuNRx5sP 5PKspPCKzIrOfKDJobypVWE//RdMw9rMoJBZScf4= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110011] -mfull-toc (-mfp-in-toc) yields incorrect _Float128 constants on power9 Date: Mon, 19 Jun 2023 09:29:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 8.3.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110011 --- Comment #8 from CVS Commits --- The releases/gcc-10 branch has been updated by Kewen Lin : https://gcc.gnu.org/g:a137fc8de056c7e0e93047b865bcc1948bd8ee03 commit r10-11453-ga137fc8de056c7e0e93047b865bcc1948bd8ee03 Author: Kewen Lin Date: Mon Jun 12 01:07:52 2023 -0500 rs6000: Don't use TFmode for 128 bits fp constant in toc [PR110011] As PR110011 shows, when encoding 128 bits fp constant into toc, we adopts REAL_VALUE_TO_TARGET_LONG_DOUBLE which is to find the first float mode with LONG_DOUBLE_TYPE_SIZE bits of precision, it would be TFmode here. But the 128 bits fp constant can be with mode IFmode or KFmode, which doesn't necessarily have the same underlying float format as the one of TFmode, like this PR exposes, with option -mabi=3Dibmlongdouble TFmode has ibm_extended_format while KFmode has ieee_quad_format, mixing up the formats (the encoding/decoding ways) would cause unexpected results. This patch is to make it use constant's own mode instead of TFmode for real_to_target call. PR target/110011 gcc/ChangeLog: * config/rs6000/rs6000.c (output_toc): Use the mode of the 128-= bit floating constant itself for real_to_target call. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr110011.c: New test. (cherry picked from commit 388809f2afde874180da0669c669e241037eeba0)=