From patchwork Fri Jan 12 09:26:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Cederman X-Patchwork-Id: 83968 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 3504B3858C53 for ; Fri, 12 Jan 2024 09:27:14 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from smtp-out3.simply.com (smtp-out3.simply.com [94.231.106.210]) by sourceware.org (Postfix) with ESMTPS id 7A8E93858D35 for ; Fri, 12 Jan 2024 09:26:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A8E93858D35 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=gaisler.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gaisler.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7A8E93858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=94.231.106.210 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705051608; cv=none; b=wTIcFgg8XY1RBoLkzLm+2/0FfSPwEnUo5a1qtCXHa5vahmd2gYY44ZAgNNCvjUKWsabusChkBNMyNQ++kXrxUMiVidsSwBZsO4gEKJB5QUVV2kB2KcWzwZ8CCYJHxDlM39FGVSb+KaJ8+phqqko0Q83ib0B72Kn5w/p+M/k7XWY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705051608; c=relaxed/simple; bh=B6/oBhJDQ13FbKp2esZzR8lnbrAtCcDzcdBDAtuYyWA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=XvHECbzE/zQmpKLzdNkK+AWRbOA+9khTX4xvQJr3HOxi+9c97psarfUpjCrRh5r6v0kEBGaT+p+8fO0cFyczB/CbNRwSLSum4Xv9mKiB76AuHFm6mQJOJbjfDfymlezL3y5D7afs7HrP6N4m6mfI+lMMIqj2V4vmoO6NWp2bzOE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by smtp.simply.com (Simply.com) with ESMTP id 4TBGPw11pvz6805; Fri, 12 Jan 2024 10:26:44 +0100 (CET) Received: from cederman.got.gaisler.com (h-98-128-223-123.NA.cust.bahnhof.se [98.128.223.123]) by smtp.simply.com (Simply.com) with ESMTPA id 4TBGPv6BP7z67rs; Fri, 12 Jan 2024 10:26:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaisler.com; s=unoeuro; t=1705051603; bh=hLeONoAsoDuJuPmX7uOPK47e0rkA+6T2ZOHn/o9bNQc=; h=From:To:Cc:Subject:Date; b=G0PfVznxAjrxjXnvLSioYd76/vZSLUz18kZotIIoe0RIis2LaRpWe2qMBhrIFNNLg p99+MMZ+Nxeda0noTA+lXQonySPDCPYauX26pP4kATTSxlIMC7nrEuhIlJ2ecfhUJu DczvNVXRYPnigowfJ2Z9cq2AvVFakLMwrbnu0JH8= From: Daniel Cederman To: libc-alpha@sourceware.org Cc: daniel@gaisler.com, andreas@gaisler.com Subject: [PATCH] sparc: Do not test preservation of NaN payloads for LEON Date: Fri, 12 Jan 2024 10:26:23 +0100 Message-Id: <20240112092628.2464455-1-cederman@gaisler.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-15.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, 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 The FPU used by LEON does not preserve NaN payload. This change allows the math/test-*-canonicalize tests to pass on LEON. Signed-off-by: Daniel Cederman Reviewed-by: Adhemerval Zanella --- .../sparc32/fpu/math-tests-snan-payload.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/sparc/sparc32/fpu/math-tests-snan-payload.h diff --git a/sysdeps/sparc/sparc32/fpu/math-tests-snan-payload.h b/sysdeps/sparc/sparc32/fpu/math-tests-snan-payload.h new file mode 100644 index 0000000000..d84e4d997b --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/math-tests-snan-payload.h @@ -0,0 +1,30 @@ +/* Configuration for math tests: sNaN payloads. SPARC version. + Copyright (C) 2016-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef SPARC_MATH_TESTS_SNAN_PAYLOAD_H +#define SPARC_MATH_TESTS_SNAN_PAYLOAD_H 1 + +/* LEON floating-point instructions do not preserve sNaN + payloads. */ +#if defined (__leon__) +# define SNAN_TESTS_PRESERVE_PAYLOAD 0 +#else +# define SNAN_TESTS_PRESERVE_PAYLOAD 1 +#endif + +#endif /* math-tests-snan-payload.h. */