From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A95A13858CDA; Tue, 24 Oct 2023 18:24:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A95A13858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1698171846; bh=7LuvpANZrGgMh8zD85s+9akl2MTy/JyxO4y7wfGRWnA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BrlSWJgEVLN9O2/PUwgPa0nGZ47WFgCJSzi2dGvDVkGuRnKWtYOAv66AngcoAl0Ar Pve4KoMBXiOjmng4x0kcLzWXwic9liHFOJgOm8MHewz0TVR08ulNUpWBh7Ph0oWDDb dUVs0j5OIliCvzfRbM/HWsl1JaTRVIq5N4nq0x2w= From: "bruno at clisp dot org" To: glibc-bugs@sourceware.org Subject: [Bug math/30998] fesetexceptflag clears too many floating-point exception flags on alpha Date: Tue, 24 Oct 2023 18:24:06 +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.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bruno at clisp 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: attachments.created 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=3D30998 --- Comment #2 from Bruno Haible --- Created attachment 15197 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D15197&action=3Ded= it proposed fix Find attached a proposed fix. The bug is obviously in glibc/sysdeps/alpha/fpu/fsetexcptflg.c . The line tmp =3D (tmp & ~SWCR_STATUS_MASK) | (*flagp & excepts & SWCR_STATUS_MASK); needs to be changed to tmp =3D (tmp & ~(excepts & SWCR_STATUS_MASK)) | (*flagp & excepts & SWCR_STATUS_MASK); A optimized expression (produces one less instruction when compiled by "alpha-linux-gnu-gcc -O2") is: tmp ^=3D (tmp ^ *flagp) & excepts & SWCR_STATUS_MASK; --=20 You are receiving this mail because: You are on the CC list for the bug.=