From nobody Fri Sep 8 20:49:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rj7Ww4nJFz4spBW; Fri, 8 Sep 2023 20:49:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rj7Ww4Mhzz4kCP; Fri, 8 Sep 2023 20:49:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694206172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mev21pshAp02b6iRAb6X9zGdB9Ien9e7VNLQaNIftE0=; b=LsjBWniVt3Fno8LBW4WR3fmq1kYzvNx3fmkCdpzwS8lPzjna1DdhSFmlai+ZypFuXgqlH+ CGVCkr2SurJXdv0Izg/zhqk2Qx5gcDOgse+fHNhyqCGF7qhtBTEssDLFNVU1t+BWPhKD+p Yb+DUIkRt4wrYcfy4libzTYR9JCy1rEeHxa391LgIHG/GyA21Fu67UTke9bbyyxFGa028e xtlopEdJE4fktiCwQRmgNSnpzNlbJpS18nhqA6mYwGdUdDNXFZE+hRTCVoFpfBzsnzDC7b EMVSSEC/D3j0KFM0NXiqS1cFuCaghsoLEm6K4kJw4s1ZHTh3/RjVvM00DOpTYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694206172; a=rsa-sha256; cv=none; b=s8Q05b5HStpPK6sUmd30KU3MWFnGyRoLsb+4Ar5aZ00gLLslLJnbTWe6/4KiP4HdXbqFkI 2KSdFQpZUiYNOzzHFcMAJPUUyWntQBCpGwDai5ZQDEzS6hTya4YTItgNkwmBVzMajqX0eO q8BNi5RgU6RjJYdAe/ZigWc0NB5+IRDDHUlFH8JRUBE/vQlwarlOgjk+WeShAVJs7LdbYn /o97skG+t66nybJ8egQGgovGzBRf7nIIeYujlrJzuFAzfETWQWN6yotGNb2CoqIdpxzSVK MTgackSAUteVztdd6P0Y5a3QJinwXz1WgkZ59USfvne0UqI1nITVHG2RDmNuQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694206172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mev21pshAp02b6iRAb6X9zGdB9Ien9e7VNLQaNIftE0=; b=Vg87Hjb+PKbkCHSDee+/tP2PQzokOpG8Fuzh9FeygLtc4bks08VGd6EJzrB0/to2KHHOe/ 7stKVzbYfro9e71iLac5Vb9GpGGUjps5JigZAP2kReJWyLWSkOZ/M0xoZ+iI/vsnhk/Fx9 1l3d2d8fvCD/8rXfNmNBXtLSL/LyI5mS+EDxzR9lW0XfKZ2NqHg69sv+qiaU73jXUq9xwb F5xxslNj1jb4B3+77/gMBx+xLriILUkCxFWlHMT5fbAqZcwVDd9ivgKxJ4Y07+vhDvh9Lg L/FNl/f4QhaC0Ye0eOMVK1Pxfm+LjO1nT9vNUS0aFMOZHhbDhyQV7Nvmqbx2ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rj7Ww34hkzws1; Fri, 8 Sep 2023 20:49:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 388KnW8B090898; Fri, 8 Sep 2023 20:49:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 388KnW4e090895; Fri, 8 Sep 2023 20:49:32 GMT (envelope-from git) Date: Fri, 8 Sep 2023 20:49:32 GMT Message-Id: <202309082049.388KnW4e090895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 604f6bf022ce - main - powerpcspe: Fix build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 604f6bf022cea7e48f3675aa82e756a440716fd9 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=604f6bf022cea7e48f3675aa82e756a440716fd9 commit 604f6bf022cea7e48f3675aa82e756a440716fd9 Author: Li-Wen Hsu AuthorDate: 2023-09-08 20:46:25 +0000 Commit: Li-Wen Hsu CommitDate: 2023-09-08 20:46:25 +0000 powerpcspe: Fix build Copy _fpmath.h from powerpc, which is the same as the one in powerpc64. Sponsored by: The FreeBSD Foundation --- lib/libc/powerpcspe/_fpmath.h | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/lib/libc/powerpcspe/_fpmath.h b/lib/libc/powerpcspe/_fpmath.h new file mode 100644 index 000000000000..9bc7450aacaf --- /dev/null +++ b/lib/libc/powerpcspe/_fpmath.h @@ -0,0 +1,56 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2003 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +union IEEEl2bits { + long double e; + struct { +#if _BYTE_ORDER == _LITTLE_ENDIAN + unsigned int manl :32; + unsigned int manh :20; + unsigned int exp :11; + unsigned int sign :1; +#else /* _BYTE_ORDER == _LITTLE_ENDIAN */ + unsigned int sign :1; + unsigned int exp :11; + unsigned int manh :20; + unsigned int manl :32; +#endif + } bits; +}; + +#define mask_nbit_l(u) ((void)0) +#define LDBL_IMPLICIT_NBIT +#define LDBL_NBIT 0 + +#define LDBL_MANH_SIZE 20 +#define LDBL_MANL_SIZE 32 + +#define LDBL_TO_ARRAY32(u, a) do { \ + (a)[0] = (uint32_t)(u).bits.manl; \ + (a)[1] = (uint32_t)(u).bits.manh; \ +} while(0)