From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 58B25385840A; Mon, 23 Oct 2023 14:11:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58B25385840A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1698070301; bh=XIjFnsLNGvosyAfgoGPcN17117uCTZJeyO2u+qaHPIA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vr1rk4ytZif5zV6T2a1V0ecRK107Gsnx2JHH92kDQNlEUvzOpazWTIyAU7k1ta4nU MOrb/KgNECKU9Sr0hH9cIhQlUU3VCR4ppWOtf92fxlBbAOsHXczcFrSRyX2pziOkvO i8GKRHrouSssyduXP3pg1U5gIil+yuv21rawiLyM= From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug math/30988] fesetexcept raises floating-point exception traps on ppc, ppc64, ppc64le Date: Mon, 23 Oct 2023 14:11:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: math X-Bugzilla-Version: 2.37 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30988 Adhemerval Zanella changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adhemerval.zanella at lina= ro dot o | |rg --- Comment #2 from Adhemerval Zanella --- Indeed, this seems to be an unexpected side-effect of how we implement the = GNU extension feenableexcept and returning an error seems the best option indee= d. Maybe something like: diff --git a/sysdeps/powerpc/fpu/fesetexcept.c b/sysdeps/powerpc/fpu/fesetexcept.c index 609a148a95..e5396daf44 100644 --- a/sysdeps/powerpc/fpu/fesetexcept.c +++ b/sysdeps/powerpc/fpu/fesetexcept.c @@ -29,6 +29,10 @@ fesetexcept (int excepts) /* Turn FE_INVALID into FE_INVALID_SOFTWARE. */ | (excepts >> ((31 - FPSCR_VX) - (31 - FPSCR_VXSOFT)) & FE_INVALID_SOFTWARE)); + + if (u.l & FPSCR_ENABLES_MASK) + return -1; + if (n.l !=3D u.l) { fesetenv_register (n.fenv); --=20 You are receiving this mail because: You are on the CC list for the bug.=