From patchwork Mon Nov 6 13:27:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 79194 Return-Path: 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 BFA583857C66 for ; Mon, 6 Nov 2023 13:28:02 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by sourceware.org (Postfix) with ESMTPS id F3FFB3858C53 for ; Mon, 6 Nov 2023 13:27:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F3FFB3858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F3FFB3858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::730 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699277251; cv=none; b=oKHngOQEc05UX4K0DleaHEoj2AW22JX9aCmZlS+Ul6WaNVuuJsjosMcMPVJE0VbfsD+2LqmHjCghhHk5nYPg8MyVCbJUB84Qk1NU2z7emoETTv47gLBMHdfJqrJpyGBTZF4NqToHTiItM7th5stK2xhP4JkEw+Qbu2RAyHe3Ay4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699277251; c=relaxed/simple; bh=U3TO7U68zV/VH1gLF1OEP+gE10yWlon2iqsc+5Y+0PU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=eOsS/HfzCyzjU9KfMVwxjgVVxDdP8eRgltfb3ukcmHBlOiwRZ4iVEi7Elggj5gha9V+wqAaNYznq6BFNI88Oyl/S8fNYKlmCDdxbSoaESagjEpkbfkp620HdmlwXFwZrqmPfsTc0hFmyLIBI4V3Zha5IoVs5mHDfo11TErNPwRM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-qk1-x730.google.com with SMTP id af79cd13be357-777754138bdso288384585a.1 for ; Mon, 06 Nov 2023 05:27:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699277249; x=1699882049; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ifhyVU0xuLEi9GZ7tRCQR01OfHuW0wdjDKCoj9nK3Cw=; b=XJY84i9ojXgeoIam+CO9yEATClt8FFciQsvum+xyJieu3+rmAZZejF1a0ppNEqJQBj NThvzPaPUDFAH38KYbUwp4mp9uHbd8LaglPItOh9AZ8p2zSAsbOXjtJzok3MmuTegS9f XVgHTdFk1lsbk86CNDNtkzc/3ZEx0buEDvDtV1DZ3npAodm67CxXQ3dLQ5YwiTpL+Luf mPqBF1VMQ9Qwnd2gbbCd4hcCgbkvMpe/vHhJhH1NzLDWMFNkDzFlpJxlclYkLjTOel3z 8dpVxT0SwT8TV8ivvikFZfM07wjXM+Cvj3GTJaTIjjzWCG+G4AH5OZFZXRJwoX0NjPjp QkzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699277249; x=1699882049; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ifhyVU0xuLEi9GZ7tRCQR01OfHuW0wdjDKCoj9nK3Cw=; b=KyaxIf4Z2edcMIdnqYySGF1JQjhmdRYfcjYtzF8Pu9NH8eecq6Gmd2VlbM8q1cxEsq K12IrB5gKrUKFwUQmprDAsKH/G09Gv6SoIXY4J5eVScCOBElVhfM8UzfqTB6YZ6NPMSK Up60YGfJ+ET+AcnlyMfJ9C7mE/A7ug4ecqBd5WvkpYSdwJxU9d0SP8FzdSJCf7iB5RKk aY0xUmnR3WaLcy5DDjaCQSjRWUsbedUaF8JDWPB2SoeaEidPwhLc1x5mJXzfUwNuhuvs IHgt9P0e0CCGbAPr2Ne+V80JF5Z+R+rLb0U2W5NXQQGIcjJnC6XrS4wwll9qDTK1uAqM qZcw== X-Gm-Message-State: AOJu0YzlJFMSlu6MDfaLeOFh8+AXp7GT3HSEfM0iOVesYjyfNklrv0pP RxNwYVLo3WpQcUmrEHRmFGvhH0rv1i8FJ/zV7yWx+g== X-Google-Smtp-Source: AGHT+IG7Do7W6teNDt70y+IkHmjfxGgVBoHBRlrsuXaRZ1BGEavJOM2SjZZ8Moo3fPzy4lB///yskA== X-Received: by 2002:a05:620a:2483:b0:76c:df5d:13a9 with SMTP id i3-20020a05620a248300b0076cdf5d13a9mr35907936qkn.58.1699277248687; Mon, 06 Nov 2023 05:27:28 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c0:a715:c1a0:7281:6384:2ee9]) by smtp.gmail.com with ESMTPSA id k3-20020a05620a142300b0076f12fcb0easm3272722qkj.2.2023.11.06.05.27.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 05:27:28 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Bruno Haible Subject: [PATCH v2 6/7] alpha: Fix fesetexceptflag (BZ 30998) Date: Mon, 6 Nov 2023 10:27:12 -0300 Message-Id: <20231106132713.953501-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231106132713.953501-1-adhemerval.zanella@linaro.org> References: <20231106132713.953501-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 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_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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org From: Bruno Haible It clears some exception flags that are outside the EXCEPTS argument. It fixes math/test-fexcept on qemu-user. Reviewed-by: Carlos O'Donell --- sysdeps/alpha/fpu/fsetexcptflg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c index 70f3666a6e..63eb06845d 100644 --- a/sysdeps/alpha/fpu/fsetexcptflg.c +++ b/sysdeps/alpha/fpu/fsetexcptflg.c @@ -27,7 +27,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) tmp = __ieee_get_fp_control (); /* Set all the bits that were called for. */ - tmp = (tmp & ~SWCR_STATUS_MASK) | (*flagp & excepts & SWCR_STATUS_MASK); + tmp ^= (tmp ^ *flagp) & excepts & SWCR_STATUS_MASK; /* And store it back. */ __ieee_set_fp_control (tmp);