From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) by sourceware.org (Postfix) with ESMTPS id 2E50E3858D37 for ; Wed, 17 Aug 2022 22:06:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E50E3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f172.google.com with SMTP id m6so4917123oib.4 for ; Wed, 17 Aug 2022 15:06:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:reply-to:mime-version :x-gm-message-state:from:to:cc; bh=nxX06DA5DjxaC9VAsI92ry0IrgknrB54B6f2N3RzpMU=; b=c96WYcXpCmGb6tMv34R4xBHLh/KjqaJtEQLAwmwCi3ViYMJtFiv8yoTDybyCYfIYms 7Txp7b76vhx0KpYwt6XmdQTlNYGLdxfhBvuJj0vyTIVxW18D5dDZ8li62v6z4IeO3btV qJjHTfjPjV3BDLzh49Qab81VGq9aLYahn3bdi0CrChSz4MvbM974flBHa2FNr22g/p9n a4MnhqAMhzv6z+K2cpKGWMe5yHyjuplIkXg08ly4XUxHZrGma5Ls43oLxm+cVjUrEbrv JIa5173OH0a9mEBjzDYbo9L6CZkQk1BIPtimEacSeE2uAndEt7jkLbFfIzG6Bidmb9Rr 5uAw== X-Gm-Message-State: ACgBeo3MhKz6Wm1EdImpS8V+iTs5Jki5mG0gY1vjbJqm2qBiuEGMHjOi yoDJ1LN18vNRPfvVoIe9AtnM55mijqo= X-Google-Smtp-Source: AA6agR679OInNTTYlOCxe9KNS99ZyF0XIEwDvWy4qdDcuKIjm1aSYYGeXPnqWUyLLalPTCFifpa/zA== X-Received: by 2002:a05:6808:3d1:b0:343:4049:6899 with SMTP id o17-20020a05680803d100b0034340496899mr2432767oie.152.1660773997188; Wed, 17 Aug 2022 15:06:37 -0700 (PDT) Received: from mail-oa1-f45.google.com (mail-oa1-f45.google.com. [209.85.160.45]) by smtp.gmail.com with ESMTPSA id l14-20020a056870218e00b0011c47d23707sm928709oae.54.2022.08.17.15.06.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Aug 2022 15:06:36 -0700 (PDT) Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-11c896b879bso318951fac.3 for ; Wed, 17 Aug 2022 15:06:36 -0700 (PDT) X-Received: by 2002:a05:6870:249c:b0:10c:7f4d:71ab with SMTP id s28-20020a056870249c00b0010c7f4d71abmr23178oaq.15.1660773996628; Wed, 17 Aug 2022 15:06:36 -0700 (PDT) MIME-Version: 1.0 Reply-To: joel@rtems.org From: Joel Sherrill Date: Wed, 17 Aug 2022 17:06:25 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Revisiting More Complete long double Support To: Newlib X-Spam-Status: No, score=-3031.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2022 22:06:42 -0000 Hi I'm looking at newlib long double support again when sizeof(long double) != sizeof(double). (1) Merged FreeBSD C code for long double math FreeBSD has C code for long double math routines as default implementation: https://github.com/freebsd/freebsd-src/tree/main/lib/msun/src I **THINK** those will work if LDBL != DBL so that code might need the ifdef for LDBL_EQ_DBL to pick the current newlib common implementation of the method which just calls the normal version of the method. I code even add the files as XXX_freebsd.c and only add ifdef _LDBL_EQ_DBL long double acosl (long double x) { return acos(x); } #else #include "acosl_freebsd.c" #endif which would definitely avoid edits to the FreeBSD source. (2) More i386 assembly versions Then there appears to be some long double methods for the i386/87 here which newlib doesn't currently have: https://github.com/freebsd/freebsd-src/tree/main/lib/msun/i387 Thoughts on adding this long double code from FreeBSD? Thanks. --joel