From patchwork Mon Jan 4 14:24:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1422092 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=sourceware.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=epqX1+jt; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D8dFq3pl2z9sVv for ; Tue, 5 Jan 2021 01:25:35 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 752C4387540F; Mon, 4 Jan 2021 14:25:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 752C4387540F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1609770329; bh=ZASXLp1OYzIrp69iA4FsTjrBs7AzMIR3lo1T5gjdCpM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=epqX1+jtFaUxITKQ0ZOS4HYiT8B4p6ffdTR0GioV/aMEsJxDfyYbtRwca938n9qTA bA9sxkxuYlCVSUQV5lKvCPdYrZnPYbkTE/gxyekoTPz8xPgyNs2SMiXUMeUJQ36YUg j5faZgVeXMakng26/wiVYqdR64BehdzkmPPl7WKM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from bee.birch.relay.mailchannels.net (bee.birch.relay.mailchannels.net [23.83.209.14]) by sourceware.org (Postfix) with ESMTPS id AAD143840C2A for ; Mon, 4 Jan 2021 14:25:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AAD143840C2A X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 677371E19EB; Mon, 4 Jan 2021 14:25:24 +0000 (UTC) Received: from pdx1-sub0-mail-a68.g.dreamhost.com (100-96-1-8.trex.outbound.svc.cluster.local [100.96.1.8]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CA1AA1E189B; Mon, 4 Jan 2021 14:25:23 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a68.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.11); Mon, 04 Jan 2021 14:25:24 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Interest-Versed: 04dbcac218adc35a_1609770324075_1756250741 X-MC-Loop-Signature: 1609770324075:662620675 X-MC-Ingress-Time: 1609770324075 Received: from pdx1-sub0-mail-a68.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a68.g.dreamhost.com (Postfix) with ESMTP id 70BD37E491; Mon, 4 Jan 2021 06:25:23 -0800 (PST) Received: from rhbox.lan (unknown [103.199.172.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a68.g.dreamhost.com (Postfix) with ESMTPSA id 5DEB27E492; Mon, 4 Jan 2021 06:25:19 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a68 To: libc-alpha@sourceware.org Subject: [PATCH 1/2] Drop nan-pseudo-number.h usage from tests Date: Mon, 4 Jan 2021 19:54:42 +0530 Message-Id: <20210104142443.3034204-2-siddhesh@sourceware.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210104142443.3034204-1-siddhesh@sourceware.org> References: <20210104142443.3034204-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1168.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_ABUSEAT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Cc: fweimer@redhat.com, joseph@codesourcery.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Make the tests use TEST_COND_intel96 to decide on whether to build the unnormal tests instead of the macro in nan-pseudo-number.h and then drop the header inclusion. This unbreaks test runs on all architectures that do not have ldbl-96. Also drop the HANDLE_PSEUDO_NUMBERS macro since it is not used anywhere. --- math/libm-test-driver.c | 5 ++--- math/libm-test-fpclassify.inc | 4 ++-- math/libm-test-isinf.inc | 4 ++-- math/libm-test-isnan.inc | 4 ++-- math/libm-test-issignaling.inc | 4 ++-- sysdeps/ieee754/ldbl-96/nan-pseudo-number.h | 4 +--- sysdeps/x86/fpu/nan-pseudo-number.h | 1 - 7 files changed, 11 insertions(+), 15 deletions(-) diff --git a/math/libm-test-driver.c b/math/libm-test-driver.c index 87f2793061..f7c0861c39 100644 --- a/math/libm-test-driver.c +++ b/math/libm-test-driver.c @@ -19,7 +19,6 @@ #include "libm-test-support.h" #include -#include /* Flags set by the including file. */ const int flag_test_errno = TEST_ERRNO; @@ -124,7 +123,7 @@ const char qtype_str[] = TYPE_STR; #define snan_value_ld __builtin_nansl ("") /* For pseudo-normal number tests. */ -#if HANDLE_PSEUDO_NUMBERS +#if TEST_COND_intel96 # include #define pseudo_inf { .parts = { 0x00000000, 0x00000000, 0x7fff }} #define pseudo_zero { .parts = { 0x00000000, 0x00000000, 0x0100 }} @@ -328,7 +327,7 @@ struct test_f_i_data } rd, rn, rz, ru; }; /* Used for RUN_TEST_LOOP_f_i_tg_u and RUN_TEST_LOOP_f_b_tg_u. */ -#if HANDLE_PSEUDO_NUMBERS +#if TEST_COND_intel96 struct test_f_i_data_u { const char *arg_str; diff --git a/math/libm-test-fpclassify.inc b/math/libm-test-fpclassify.inc index 39728d0771..c1c7e1ead1 100644 --- a/math/libm-test-fpclassify.inc +++ b/math/libm-test-fpclassify.inc @@ -37,7 +37,7 @@ static const struct test_f_i_data fpclassify_test_data[] = TEST_f_i (fpclassify, -min_subnorm_value, FP_SUBNORMAL, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), }; -#if HANDLE_PSEUDO_NUMBERS +#if TEST_COND_intel96 static const struct test_f_i_data_u fpclassify_test_data_u[] = { TEST_f_i (fpclassify, pseudo_zero, FP_NAN, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), @@ -52,7 +52,7 @@ static void fpclassify_test (void) { ALL_RM_TEST (fpclassify, 1, fpclassify_test_data, RUN_TEST_LOOP_f_i_tg, END); -#if HANDLE_PSEUDO_NUMBERS +#if TEST_COND_intel96 ALL_RM_TEST (fpclassify, 1, fpclassify_test_data_u, RUN_TEST_LOOP_f_i_tg_u, END); #endif } diff --git a/math/libm-test-isinf.inc b/math/libm-test-isinf.inc index 38f973ba38..7d4b27a45c 100644 --- a/math/libm-test-isinf.inc +++ b/math/libm-test-isinf.inc @@ -37,7 +37,7 @@ static const struct test_f_i_data isinf_test_data[] = TEST_f_b (isinf, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), }; -#if HANDLE_PSEUDO_NUMBERS +#if TEST_COND_intel96 static const struct test_f_i_data_u isinf_test_data_u[] = { TEST_f_b (isinf, pseudo_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), @@ -52,7 +52,7 @@ static void isinf_test (void) { ALL_RM_TEST (isinf, 1, isinf_test_data, RUN_TEST_LOOP_f_b_tg, END); -#if HANDLE_PSEUDO_NUMBERS +#if TEST_COND_intel96 ALL_RM_TEST (isinf, 1, isinf_test_data_u, RUN_TEST_LOOP_f_b_tg_u, END); #endif } diff --git a/math/libm-test-isnan.inc b/math/libm-test-isnan.inc index 948a3afdec..501bb1856f 100644 --- a/math/libm-test-isnan.inc +++ b/math/libm-test-isnan.inc @@ -37,7 +37,7 @@ static const struct test_f_i_data isnan_test_data[] = TEST_f_b (isnan, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), }; -#if HANDLE_PSEUDO_NUMBERS +#if TEST_COND_intel96 static const struct test_f_i_data_u isnan_test_data_u[] = { TEST_f_b (isnan, pseudo_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), @@ -52,7 +52,7 @@ static void isnan_test (void) { ALL_RM_TEST (isnan, 1, isnan_test_data, RUN_TEST_LOOP_f_b_tg, END); -#if HANDLE_PSEUDO_NUMBERS +#if TEST_COND_intel96 ALL_RM_TEST (isnan, 1, isnan_test_data_u, RUN_TEST_LOOP_f_b_tg_u, END); #endif } diff --git a/math/libm-test-issignaling.inc b/math/libm-test-issignaling.inc index cc7c801e29..bea61a3664 100644 --- a/math/libm-test-issignaling.inc +++ b/math/libm-test-issignaling.inc @@ -39,7 +39,7 @@ static const struct test_f_i_data issignaling_test_data[] = TEST_f_b (issignaling, -snan_value_MACRO, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), }; -#if HANDLE_PSEUDO_NUMBERS +#if TEST_COND_intel96 static const struct test_f_i_data_u issignaling_test_data_u[] = { TEST_f_b (issignaling, pseudo_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), @@ -54,7 +54,7 @@ static void issignaling_test (void) { ALL_RM_TEST (issignaling, 1, issignaling_test_data, RUN_TEST_LOOP_f_b_tg, END); -#if HANDLE_PSEUDO_NUMBERS +#if TEST_COND_intel96 ALL_RM_TEST (issignaling, 1, issignaling_test_data_u, RUN_TEST_LOOP_f_b_tg_u, END); #endif } diff --git a/sysdeps/ieee754/ldbl-96/nan-pseudo-number.h b/sysdeps/ieee754/ldbl-96/nan-pseudo-number.h index 771515a546..4df3b2e4de 100644 --- a/sysdeps/ieee754/ldbl-96/nan-pseudo-number.h +++ b/sysdeps/ieee754/ldbl-96/nan-pseudo-number.h @@ -19,9 +19,7 @@ #ifndef NAN_PSEUDO_NUMBER_H #define NAN_PSEUDO_NUMBER_H 1 -/* Set this macro and override the definition of IS_PSEUDO_SIGNALING if pseudo - numbers need special handling. */ -#define HANDLE_PSEUDO_NUMBERS 0 +/* Default is to assume that pseudo numbers are not signaling. */ static inline int is_pseudo_signaling (uint32_t exi, uint32_t hxi) { diff --git a/sysdeps/x86/fpu/nan-pseudo-number.h b/sysdeps/x86/fpu/nan-pseudo-number.h index e4e015b09f..84a05ea040 100644 --- a/sysdeps/x86/fpu/nan-pseudo-number.h +++ b/sysdeps/x86/fpu/nan-pseudo-number.h @@ -19,7 +19,6 @@ #ifndef NAN_PSEUDO_NUMBER_H #define NAN_PSEUDO_NUMBER_H 1 -#define HANDLE_PSEUDO_NUMBERS 1 /* Pseudo numbers on x86 are always signaling. */ static inline int is_pseudo_signaling (uint32_t exi, uint32_t hxi)