From owner-svn-src-all@freebsd.org Thu Aug 15 15:47:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A5A0ACD28; Thu, 15 Aug 2019 15:47:49 +0000 (UTC) (envelope-from kevans@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468W786G9wz40LS; Thu, 15 Aug 2019 15:47:48 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B531D1AC78; Thu, 15 Aug 2019 15:47:48 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7FFlmIv078968; Thu, 15 Aug 2019 15:47:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7FFlmtn078965; Thu, 15 Aug 2019 15:47:48 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201908151547.x7FFlmtn078965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Aug 2019 15:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351078 - in head: lib/libc/quad stand/libsa X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: lib/libc/quad stand/libsa X-SVN-Commit-Revision: 351078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2019 15:47:49 -0000 Author: kevans Date: Thu Aug 15 15:47:48 2019 New Revision: 351078 URL: https://svnweb.freebsd.org/changeset/base/351078 Log: stand: kick out quad.h Use quad.h from libc instead for the time being. This reduces the number of nearly-identical-quad.h we have in tree to two with only minor changes. Prototypes for some *sh*di3 have been added to match the copy in libkern. The differences between the two are likely few enough that they can perhaps be merged with little additional effort to bring us down to 1. MFC after: 3 days Deleted: head/stand/libsa/quad.h Modified: head/lib/libc/quad/quad.h head/stand/libsa/Makefile Modified: head/lib/libc/quad/quad.h ============================================================================== --- head/lib/libc/quad/quad.h Thu Aug 15 15:27:58 2019 (r351077) +++ head/lib/libc/quad/quad.h Thu Aug 15 15:47:48 2019 (r351078) @@ -55,6 +55,11 @@ #include #include +#ifdef _STANDALONE +_Static_assert(sizeof(quad_t) == sizeof(int) * 2, + "Bitwise function in libstand are broken on this architecture\n"); +#endif + /* * Depending on the desired operation, we view a `long long' (aka quad_t) in * one or more of the following formats. @@ -79,7 +84,14 @@ union uu { */ #define QUAD_BITS (sizeof(quad_t) * CHAR_BIT) #define LONG_BITS (sizeof(long) * CHAR_BIT) +#ifdef _STANDALONE +/* + * libsa assumes sizeof(int) for qdivrem + */ +#define HALF_BITS (sizeof(int) * CHAR_BIT / 2) +#else #define HALF_BITS (sizeof(long) * CHAR_BIT / 2) +#endif /* * Extract high and low shortwords from longword, and move low shortword of @@ -103,3 +115,7 @@ u_quad_t __udivdi3(u_quad_t a, u_quad_t b); u_quad_t __umoddi3(u_quad_t a, u_quad_t b); typedef unsigned int qshift_t; + +quad_t __ashldi3(quad_t, qshift_t); +quad_t __ashrdi3(quad_t, qshift_t); +quad_t __lshrdi3(quad_t, qshift_t); Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Thu Aug 15 15:27:58 2019 (r351077) +++ head/stand/libsa/Makefile Thu Aug 15 15:47:48 2019 (r351078) @@ -121,6 +121,7 @@ beforedepend: ln -sf ${SYSDIR}/sys/stdint.h stdint.h; \ ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ + ln -sf ${LIBC_SRC}/quad/quad.h quad.h; \ for i in _time.h _strings.h _string.h; do \ [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ done; \