From patchwork Thu Oct 21 13:18:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 1544376 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=n04mvh/d; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HZp444Z2dz9sPB for ; Fri, 22 Oct 2021 00:19:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8C5F63857C70 for ; Thu, 21 Oct 2021 13:19:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C5F63857C70 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1634822385; bh=bkzrR4C9D+ptNN1SrBsxzq9Y3/AJg0+RdvF12jOJ3Ps=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=n04mvh/d+DBHDJDGSwzELbtoaPFCAOPKmEyfLEI9f2oJIgkZFqg5taKL0bV0j4oVl Y/JxXcntSsdD1oB1KjyYFoGh/i7JO57j6jowt93R0a5Ky0sI/QArsyGe9AmJ9RZBDD gE0BTJT2Qtip5AsQgdIRkkBSdL5Aq/v71vX+E5IE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id 1963C3858D39 for ; Thu, 21 Oct 2021 13:19:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1963C3858D39 Received: by mail-pj1-x1032.google.com with SMTP id nn3-20020a17090b38c300b001a03bb6c4ebso542501pjb.1 for ; Thu, 21 Oct 2021 06:19:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bkzrR4C9D+ptNN1SrBsxzq9Y3/AJg0+RdvF12jOJ3Ps=; b=2hbO6+Z28mN5p5tkEo9ENkKXqPQ4lXh+EXOoZrcBfeTyw2IfEBuyBeRd5jxbzsCZ9M H7lJuFBwlQrzCCyF9URMm8uFjE91B+gf/LjK491EkDA4M4kegIZTpDjNllYT3NjCxV68 8FL0eHkSVEB8rGkd5bAGr5eLNkLrZZEAHHDJY3Jt3QW9yXOEgSciHe+bDH/SF2oUsFaw 8pXRT8Q1HW9Dq9hyXJ+WMNbAmUrqhmeJ+5QmbhaaibNT7EeX4a0zi0LUIj9+NlMull8z tPJT6VO/EfwRqP9MAGsxcEHEArahF3/EDPQbzD/DDjrHIULbrkKfTDUcRZUsQWvXNNhS 53NQ== X-Gm-Message-State: AOAM5324q61ukwITDOSXvB46sAUWaL71HMcDerO/6LsNOGbChPQs37Sh UeMPkBEhpk9jnldbD+O+R+BeinKoWLs= X-Google-Smtp-Source: ABdhPJy3//+xLrMcOI4iWbbJsjZN00yySKdorLRWjo1ghsWWhJghkz+hrdh8Umw/h7R2/YT73mbltg== X-Received: by 2002:a17:90b:4ac9:: with SMTP id mh9mr6736204pjb.173.1634822343736; Thu, 21 Oct 2021 06:19:03 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id o4sm6072689pfb.48.2021.10.21.06.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 06:19:03 -0700 (PDT) To: GCC patches Subject: [PATCH] or1k: Update FPU to specify detect tininess before rounding Date: Thu, 21 Oct 2021 22:18:59 +0900 Message-Id: <20211021131859.1065675-1-shorne@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Stafford Horne via Gcc-patches From: Stafford Horne Reply-To: Stafford Horne Cc: Openrisc Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This was not defined in the spec and not consistent in the implementation causing incosistent behavior. After review we have updated the CPU implementations and proposed the spec be updated to specific that FPU tininess checks check for tininess before roudning. Architecture change draft: https://openrisc.io/proposals/p18-fpu-tininess libgcc/ChangeLog: * config/or1k/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Change to 0. --- libgcc/config/or1k/sfp-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgcc/config/or1k/sfp-machine.h b/libgcc/config/or1k/sfp-machine.h index eebe5b0578e..162c6bc5326 100644 --- a/libgcc/config/or1k/sfp-machine.h +++ b/libgcc/config/or1k/sfp-machine.h @@ -85,7 +85,7 @@ do { \ #define __BYTE_ORDER __BIG_ENDIAN -#define _FP_TININESS_AFTER_ROUNDING 1 +#define _FP_TININESS_AFTER_ROUNDING 0 /* Define ALIASNAME as a strong alias for NAME. */ # define strong_alias(name, aliasname) _strong_alias(name, aliasname)