| Message ID | 20251016220834.2956506-1-mreynolds@aurora.tech |
|---|---|
| State | New |
| Headers |
Return-Path: <newlib-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4B4963857C7A for <patchwork@sourceware.org>; Thu, 16 Oct 2025 22:09:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B4963857C7A Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=aurora.tech header.i=@aurora.tech header.a=rsa-sha256 header.s=google header.b=Z+Qd+R1W X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by sourceware.org (Postfix) with ESMTPS id 7E5E4385842F for <newlib@sourceware.org>; Thu, 16 Oct 2025 22:08:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E5E4385842F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=aurora.tech Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aurora.tech ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7E5E4385842F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::f2a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760652531; cv=none; b=oubUKM0N8wjZz1QgIBm28IEGu2JRcB0AmlFR9PSOBc6puUKsnDC2KwWcpVnU7/6/dZshVgZTGkiDZxFn9hBGl+z3CU3HdVsGqwmjVE3vXqPyosgjR6WYvrL77CfmNEGJy5vmLwQ2Kjp40+nitfqc6PQ6iH7uObFovJnlQcAry64= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760652531; c=relaxed/simple; bh=nvwCZ0WWBV3/PqSanHFY7U05xweQ4d3IVybiMh8UeZI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=GPHYPtMC1cnvMuIn6ps42e/qDxTPKL/PJeWtp8VM2Ci6z3ulupU+KChGAkSuVbhsC56rTn5fRlLo8p9uRrDJM6kcClsHjCzMcU8n62ly0iZ9xOvQWnoSWoLO3O1cooUGLphCMCAtnx4jh/AA4CGa9acMN9jduBtpclIMmqLJy54= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E5E4385842F Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-87c1ceac7d7so13466836d6.1 for <newlib@sourceware.org>; Thu, 16 Oct 2025 15:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aurora.tech; s=google; t=1760652529; x=1761257329; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iD5G7LMDE2oiIhRAEIux2Kko7K9lZUace59UBpFTAUQ=; b=Z+Qd+R1Wn2pGei9KRz9E0CHY4y8ISrrpluJRuiwgVzwBcxnTEETwi/UcHPbmW5jC7/ BiA267DXDlb7EeoB2CPx8MeAifVucI92CCc7J7xxdgVZdotvd2d+LNRfxyHIRxsHoy+m 04l1M3U2bXRtQ1iDB/YIBtYSuV2PvaC8/WYZTeY54/NgWCrVk8ZACdHP6nPvAAjfh+bY XrhFBMyDAUmueuaXE+b9vOH+5W2+xNIkU7SA+56ezi0MP4TiGV3Ktu85R/yS0eZGinYV yJoBCSNP6WmWObrZSkz5BHD+PAiPhZIBG9pdssUgsDvZA8eWBx2B5fnA7jYwv01k8bFv yRQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760652529; x=1761257329; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iD5G7LMDE2oiIhRAE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HkahGK0RebdNoeLF8X HI7Dd1O1um/UQYuTEz2sZOcabxKi1yUqa7f7dhkuj5RA9AhLhFOXx+LY9EYmIE9LInmUTNWw6gs 0uVEGkPXOcI X-Google-Smtp-Source: AGHT+IE1H0HDhl1Imr6X+053YNgp/SBZRXN0xf+OvbVZ5SuPPrKJqj5NiY1RC7m96pqGkYwrUxKmNg== X-Received: by 2002:a05:622a:1482:b0:4e6:ebcc:23fb with SMTP id d75a77b69052e-4e89d2b9904mr30494871cf.36.1760652529365; Thu, 16 Oct 2025 15:08:49 -0700 (PDT) Received: from mreynolds-vdesk.vdesk.cloud.aurora.tech (ec2-35-174-109-124.compute-1.amazonaws.com. [35.174.109.124]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4e881c8a20csm51079341cf.16.2025.10.16.15.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Oct 2025 15:08:48 -0700 (PDT) From: Matt Reynolds <mreynolds@aurora.tech> To: newlib@sourceware.org Cc: Matt Reynolds <mreynolds@aurora.tech> Subject: [PATCH] Fix ARM fegetexceptflag.c Date: Thu, 16 Oct 2025 22:08:34 +0000 Message-Id: <20251016220834.2956506-1-mreynolds@aurora.tech> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list <newlib.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/newlib>, <mailto:newlib-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/newlib/> List-Post: <mailto:newlib@sourceware.org> List-Help: <mailto:newlib-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/newlib>, <mailto:newlib-request@sourceware.org?subject=subscribe> Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
Fix ARM fegetexceptflag.c
|
|
Commit Message
Matt Reynolds
Oct. 16, 2025, 10:08 p.m. UTC
The ARM fegetexceptflag() implementation was accidentally replaced with fesetexceptflag() during refactoring in 3ca43259686187e081d317e2b406724a849c9d7b. Restore the original implementation. Tested on Cortex-M7. --- newlib/libm/machine/arm/fegetexceptflag.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On 16/10/2025 23:08, Matt Reynolds wrote: > The ARM fegetexceptflag() implementation was accidentally replaced with > fesetexceptflag() during refactoring in 3ca43259686187e081d317e2b406724a849c9d7b. > Restore the original implementation. > > Tested on Cortex-M7. > --- > newlib/libm/machine/arm/fegetexceptflag.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/newlib/libm/machine/arm/fegetexceptflag.c b/newlib/libm/machine/arm/fegetexceptflag.c > index 2bfcb08ae..17b3a3d7d 100644 > --- a/newlib/libm/machine/arm/fegetexceptflag.c > +++ b/newlib/libm/machine/arm/fegetexceptflag.c > @@ -37,9 +37,7 @@ int fegetexceptflag(fexcept_t *flagp, int excepts) > fexcept_t __fpsr; > > vmrs_fpscr(__fpsr); > - __fpsr &= ~excepts; > - __fpsr |= *flagp & excepts; > - vmsr_fpscr(__fpsr); > + *flagp = __fpsr & excepts; > #endif > return (0); > } Actually, I think the bug was introduced in b7a6e02dc6a5289bfa489c0e7b6539abd281e2c6. I've adjusted the commit message and pushed. Thanks for fixing it. R.
diff --git a/newlib/libm/machine/arm/fegetexceptflag.c b/newlib/libm/machine/arm/fegetexceptflag.c index 2bfcb08ae..17b3a3d7d 100644 --- a/newlib/libm/machine/arm/fegetexceptflag.c +++ b/newlib/libm/machine/arm/fegetexceptflag.c @@ -37,9 +37,7 @@ int fegetexceptflag(fexcept_t *flagp, int excepts) fexcept_t __fpsr; vmrs_fpscr(__fpsr); - __fpsr &= ~excepts; - __fpsr |= *flagp & excepts; - vmsr_fpscr(__fpsr); + *flagp = __fpsr & excepts; #endif return (0); }