From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 dcvr.yhbt.net (Postfix) with ESMTPS id 5AEE31F44D for ; Wed, 27 Mar 2024 17:58:37 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=QXNXu2Y6; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 223AE385DC06 for ; Wed, 27 Mar 2024 17:58:36 +0000 (GMT) Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 4F3393858D34 for ; Wed, 27 Mar 2024 17:58:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4F3393858D34 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 4F3393858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::436 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711562295; cv=none; b=qV/Z2rMw0Wcu+Wo3h/hSmQvXVqk0eMziPn9zBfAgQEgiCdaU/7dL0/sezP7Jn1cHKX/jIfFQ//pKseKtGmVBF0h8cXXSvV9VV+jXP+b4S/5lI2BVA74wQVYG8OkvPcoiF8ap/khGh9TJdeyGcSKeK3MmpsXqm+Yl4q/XaQpqx4g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711562295; c=relaxed/simple; bh=RCL8eeYNMfGW0/D7HaK9E23He5sOL02X+wq6ThUXo/w=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=LAXlSf91KWElaYCEo3v8WBqyv98Spb5XjQu9sLEdkyf82MTUjDtdDBoehCv9dnuCseBJGQS3XVK1BqEf64+JLY6ZQuARUXTiKYnbAXRKsgdS1WHNjYpk3jecdphroLyO77WprBauU3H9EWGOoy1telzUwdrUQsPCGUg4lkcNZV0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6e6b729669bso130545b3a.3 for ; Wed, 27 Mar 2024 10:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711562291; x=1712167091; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=/AHXAmc2vzIs4XJSa20E8WJ/ROhAM+aaTXekBv1es+o=; b=QXNXu2Y6zmx8QwdxmAhYsTtftiGSOknqtwdlpDhwEsS//D/by7dA7n+rHehs5EsBlK 7MLU0HAJh85wMTLrXXMmdwtwAvvfCv+HANXqGftklF/ETJ9uhF9VfesY6WQqET7paxZv tjHVzBsEDtHBj4RhYD0lzDJzajLkCQ8jYNN+sAXwqapNyT3uomi3LTXVc4yIk1FWR2F+ PFqyrs5FsO0LmfapeObkogu1corZXFdjEIO4AH1QkeUcnisIgz+PLf/DFQ6WeWBhkYvM I4Ebps7viQuXFzG22PQxxE3Xd3Xs/HI7PcKzl8iRz6MnU8hz2zMX6z7pq121zRysvWrz F1JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711562291; x=1712167091; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/AHXAmc2vzIs4XJSa20E8WJ/ROhAM+aaTXekBv1es+o=; b=tzMdYzU8eWVJlhqpF/XJ69b85tY264iGibyBK0LOLZhKOOkyiTuEinK6QjgkxD2Ot7 V1rUP8R9kg/J5g2GTTTSicrP/m5NSBAKM0uy4D7WAhxiHPxnrVEsUNJP5uvCF0f8t8Nh 4Zgp3QvOxHmKcsR/UH2NS2/kRBYxWu6kEG8iclRD8w0zKD3CXOXnS72kxlmySasZRL5E ESD866SYl/rMfNOhK2uHYu3N6EIoA1xLzzyZ422MFaUST0GKW3M330nWlACsL6H1biBi p7rN3fT/Xx9+ZToOB2UWey5RqQA91jJPbfZlWsP2c8N0bPyHuUaex5sP19Cim+LVgex5 ZzEg== X-Gm-Message-State: AOJu0YweQcHguF6zKLfKXwXuqP8oEk8GO3F2O1o40Sb7WXP91W6NExH6 U6FwwNiDu9aMh9aqr1HPvNdSSlglrrzMUU8dQT8iM/sN12PQ41VzpD33rETh8wc= X-Google-Smtp-Source: AGHT+IGztJErF4pmm829iQajrTMzUT7LSIEFI6/ZhCRxCv0dYL7zUQ32j67f3KJcJnOWYSqaCHKh7Q== X-Received: by 2002:a05:6a00:1a8c:b0:6ea:acbe:5187 with SMTP id e12-20020a056a001a8c00b006eaacbe5187mr547014pfv.20.1711562291038; Wed, 27 Mar 2024 10:58:11 -0700 (PDT) Received: from [192.168.15.31] ([187.56.129.71]) by smtp.gmail.com with ESMTPSA id x28-20020a056a000bdc00b006ea7e972947sm8098414pfu.130.2024.03.27.10.58.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Mar 2024 10:58:10 -0700 (PDT) Message-ID: <21a70abc-787c-403d-bf3d-24e386be8a7e@linaro.org> Date: Wed, 27 Mar 2024 14:58:07 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 11/15] math: Fix acos template for arguments greater than 1 To: Joseph Myers Cc: libc-alpha@sourceware.org, Florian Weimer , "H . J . Lu" References: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> <20240327164527.3717523-12-adhemerval.zanella@linaro.org> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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+e=80x24.org@sourceware.org On 27/03/24 14:14, Joseph Myers wrote: > On Wed, 27 Mar 2024, Adhemerval Zanella wrote: > >> The template is used by some ABsI for static build, and it fails set >> the expected floating exceptions if the argument is outside of the >> range (on x86_64 this triggers an overflow calculation in >> __ieee754_acos). > > Patches 11 through 15 all seem incorrect; it's the responsibility of the > __ieee754_* functions to raise the correct exceptions, not of the > wrappers. Please make sure you don't have a compiler with a bug like > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95115 miscompiling those > __ieee754_* functions. > The failures are both: math/test-float64x-acos-static math/test-ldouble-acos-static $ cat math/test-ldouble-acos-static.out testing long double (without inline functions) Failure: acos (max_value): Exception "Overflow" set Failure: acos (-max_value): Exception "Overflow" set Failure: acos_downward (max_value): Exception "Overflow" set Failure: acos_downward (-max_value): Exception "Overflow" set Failure: acos_towardzero (max_value): Exception "Overflow" set Failure: acos_towardzero (-max_value): Exception "Overflow" set Failure: acos_upward (max_value): Exception "Overflow" set Failure: acos_upward (-max_value): Exception "Overflow" set Test suite completed: 452 test cases plus 448 tests for exception flags and 448 tests for errno executed. 8 errors occurred. And I think it is unrelated to gcc PR95115 because x86_64/i686 will use and specific sysdeps/i386/fpu/e_acosl.c that explicit does not handle this input case for overflow exceptions. For shared build this case is handle by w_acosl_compat.c: if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0) && _LIB_VERSION != _IEEE_) { /* acos(|x|>1) */ feraiseexcept (FE_INVALID); return __kernel_standard_l (x, x, 201); } And that's why I though following the same logic on template would be better. But I think maybe we should fix on x86_64 implementation instead.