Message ID | 20240403193919.1533786-1-adhemerval.zanella@linaro.org |
---|---|
Headers |
Return-Path: <libc-alpha-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 950BE3844755 for <patchwork@sourceware.org>; Wed, 3 Apr 2024 19:39:58 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 106093847725 for <libc-alpha@sourceware.org>; Wed, 3 Apr 2024 19:39:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 106093847725 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 106093847725 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712173168; cv=none; b=hs/eit3vTVXTsecp6W/w3AulTi20bw7o4ucMTG55xyHoaQwIGCHepwjNpGLIoL8xwssakJfCm4pbwwhmQUFcijmDUdB1GxSRn8ViquD4H9n6et+g0/OkVoB70JX5EJ5iX8WuCO2TBlwdrwYctypG54IriFhiavzvoXwkeV7A/30= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712173168; c=relaxed/simple; bh=yxqIJ2eA3olz7TllKb+FjyFw2V1rCT/14QE7tPo+9QU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=gaoL9HQX+JzH0d05IzS0SEYFegMLxIRq6gdFpHszdV9XgSLK4l/7cjq72+6YrbOL41nNp/hovyFOh/8OOsHRY5o5qLEX0jKMGUUTZz6t4HORntnV55EvcKFD+R6nHH+6Kvm3GPuVGcx1mAm5c0eGrM9R1cg3UNob0LUT0sbmvAg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6e782e955adso160483b3a.3 for <libc-alpha@sourceware.org>; Wed, 03 Apr 2024 12:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712173164; x=1712777964; 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=VkxFIDoSKGiVD9Q1ioIpEla6RJBGmYprPN9tUSBHBJk=; b=glXLpflR+zt2xK8AGSBLtBz/FsVkdYFSDfg89wdJAXucIq9+zdRnAfMRSltBmfeU4/ nC63DKfjdoHbv0cffNR7MIZp4VdqOQ8PpOoK2rRTGbFU5KW5N/I5/I1r2+R8lTbrJkrA P2Nj1LlIohaaDgNO68NVcg0j6T66RgDvRh3+o4e071j7ROXu35WuFalf+4DffvSXLN3r I0ibgZqeQhevgpI+HTZHfa2WxbjfYDqMrtDfCk/00221TLW9p1ZNWSpq62akOCaTWHJg IO9wkC9zsLG0WbiiADQ2Nubc9AnEsOfJdfWNuFUg3VFHO04hGCnkVNOZt2xEyC9XCG1S EtWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712173164; x=1712777964; 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=VkxFIDoSKGiVD9Q1ioIpEla6RJBGmYprPN9tUSBHBJk=; b=WV8wAioeEWp8vKT43sHPpQG83GddBRP9x/4pohpjcjSmWbyjrMcEPdKRHClB4l2RQ0 FKu9jIhZllFNqCsI1yfT2QbC56DiMKVmisRJGxgbbQEk5dCugdd7L0gL/W+VTZZCEEvY mWH3dTdjAdEFqLqXG9PcFnbuFCBAhtsRUig5OUUlpt5RMPLrUnapAPnTwucaL4IBU2ud f7P40kTqxv+DXxTx5FbT8gRyxYxbnbgpmU4/bM9Jq1mnnkyiZpknx7IYxpsdAujiLSrL eHqhBdPFck2LbbCbMjbguwDjDgfMohxyw+Db984l9zfGn/WIl44SPpEa0EeA/VCTLFsV Y1/A== X-Gm-Message-State: AOJu0Yzp/y9/UM4gdGCjZXdCosmM3D4w4OrWvBzbfcGQ/pZWdID3nEEo op+2MyQFp/8s1GhYXPyMC11w6c2PxBBoqyznDhZJbxtQ0m3kKy2igVJjNhRYXz9MbZCD56Cpw1b v X-Google-Smtp-Source: AGHT+IGPOQgmL+plY9CLBx7xczxcp+n4L3MvByIWXoo2trW9n/kSAVwPHiqNzCcOLdaqiqMfmcrPVQ== X-Received: by 2002:a05:6a00:3a03:b0:6ec:da0b:b7e2 with SMTP id fj3-20020a056a003a0300b006ecda0bb7e2mr542544pfb.28.1712173164246; Wed, 03 Apr 2024 12:39:24 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:82b0:6301:7f28:5bcc]) by smtp.gmail.com with ESMTPSA id fd30-20020a056a002e9e00b006eaf43b5982sm8913535pfb.108.2024.04.03.12.39.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 12:39:23 -0700 (PDT) From: Adhemerval Zanella <adhemerval.zanella@linaro.org> To: libc-alpha@sourceware.org Cc: "H . J . Lu" <hjl.tools@gmail.com>, Joseph Myers <josmyers@redhat.com> Subject: [PATCH 0/3] Improve x86 rounding implementation when FE_INEXACT trap is enabled Date: Wed, 3 Apr 2024 16:39:16 -0300 Message-Id: <20240403193919.1533786-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |
Series |
Improve x86 rounding implementation when FE_INEXACT trap is enabled
|
|
Message
Adhemerval Zanella Netto
April 3, 2024, 7:39 p.m. UTC
Some x86 rounding implementation that uses 387 raises invalid floating point exceptions when traps are enabled. This is a GNU extension outside the scope of the C standard. Adhemerval Zanella (3): math: math: x86 ceill traps when FE_INEXACT is enabled (BZ 31600) math: math: x86 floor traps when FE_INEXACT is enabled (BZ 31601) math: math: x86 trunc traps when FE_INEXACT is enabled (BZ 31603) math/Makefile | 7 ++ math/test-ceil-except-2.c | 67 +++++++++++++++++++ math/test-floor-except-2.c | 67 +++++++++++++++++++ math/test-trunc-except-2.c | 67 +++++++++++++++++++ sysdeps/i386/fpu/s_ceil.S | 34 ---------- sysdeps/i386/fpu/s_ceil.c | 25 +++++++ sysdeps/i386/fpu/s_ceilf.S | 34 ---------- sysdeps/i386/fpu/s_ceilf.c | 25 +++++++ sysdeps/i386/fpu/s_ceill.S | 39 ----------- sysdeps/i386/fpu/s_floor.S | 34 ---------- sysdeps/i386/fpu/s_floor.c | 25 +++++++ sysdeps/i386/fpu/s_floorf.S | 34 ---------- sysdeps/i386/fpu/s_floorf.c | 25 +++++++ sysdeps/i386/fpu/s_floorl.S | 39 ----------- sysdeps/i386/fpu/{s_trunc.S => s_trunc.c} | 24 ++----- sysdeps/i386/fpu/{s_truncf.S => s_truncf.c} | 24 ++----- .../fpu/s_truncl.S => x86/fpu/s_ceill.c} | 29 ++------ sysdeps/x86/fpu/s_floorl.c | 25 +++++++ sysdeps/x86/fpu/s_nearestint_387_template.c | 36 ++++++++++ .../fpu/s_truncl.S => x86/fpu/s_truncl.c} | 23 ++----- sysdeps/x86_64/fpu/s_ceill.S | 34 ---------- sysdeps/x86_64/fpu/s_floorl.S | 33 --------- 22 files changed, 394 insertions(+), 356 deletions(-) create mode 100644 math/test-ceil-except-2.c create mode 100644 math/test-floor-except-2.c create mode 100644 math/test-trunc-except-2.c delete mode 100644 sysdeps/i386/fpu/s_ceil.S create mode 100644 sysdeps/i386/fpu/s_ceil.c delete mode 100644 sysdeps/i386/fpu/s_ceilf.S create mode 100644 sysdeps/i386/fpu/s_ceilf.c delete mode 100644 sysdeps/i386/fpu/s_ceill.S delete mode 100644 sysdeps/i386/fpu/s_floor.S create mode 100644 sysdeps/i386/fpu/s_floor.c delete mode 100644 sysdeps/i386/fpu/s_floorf.S create mode 100644 sysdeps/i386/fpu/s_floorf.c delete mode 100644 sysdeps/i386/fpu/s_floorl.S rename sysdeps/i386/fpu/{s_trunc.S => s_trunc.c} (69%) rename sysdeps/i386/fpu/{s_truncf.S => s_truncf.c} (68%) rename sysdeps/{i386/fpu/s_truncl.S => x86/fpu/s_ceill.c} (63%) create mode 100644 sysdeps/x86/fpu/s_floorl.c create mode 100644 sysdeps/x86/fpu/s_nearestint_387_template.c rename sysdeps/{x86_64/fpu/s_truncl.S => x86/fpu/s_truncl.c} (70%) delete mode 100644 sysdeps/x86_64/fpu/s_ceill.S delete mode 100644 sysdeps/x86_64/fpu/s_floorl.S