From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: bignum branch Date: Sun, 15 Jul 2018 07:46:39 -0600 Message-ID: <87efg4a9xc.fsf@tromey.com> References: <87o9fbbw1t.fsf@tromey.com> <86in5jdj49.fsf@gmail.com> <83wotxaiwi.fsf@gnu.org> <86k1pxmvmx.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531662296 17381 195.159.176.226 (15 Jul 2018 13:44:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 15 Jul 2018 13:44:56 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Andy Moreton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 15 15:44:52 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fehKW-0004R6-8D for ged-emacs-devel@m.gmane.org; Sun, 15 Jul 2018 15:44:52 +0200 Original-Received: from localhost ([::1]:45692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fehMd-0007LV-3m for ged-emacs-devel@m.gmane.org; Sun, 15 Jul 2018 09:47:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fehMV-0007LE-Th for emacs-devel@gnu.org; Sun, 15 Jul 2018 09:46:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fehMS-0006Tr-Rd for emacs-devel@gnu.org; Sun, 15 Jul 2018 09:46:55 -0400 Original-Received: from gateway31.websitewelcome.com ([192.185.143.31]:30137) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fehMS-0006H9-I9 for emacs-devel@gnu.org; Sun, 15 Jul 2018 09:46:52 -0400 Original-Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 789FA87F0D for ; Sun, 15 Jul 2018 08:46:40 -0500 (CDT) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id ehMGfaOwnBcCXehMGfGiKD; Sun, 15 Jul 2018 08:46:40 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2LH01J9ucMjblCEga0bnj0nhzLRTvntMxiU6Np8OD4M=; b=aIB79ZFggol1oh2Xh7R5GwHkLB NO6H8wIgfjU7NzSrEZrcjfvdkl20WEZYHS27eeZC0zjzGqmLqJCeAYwJ4vLRAGTgEmKZ5zCdtvqz0 9m4u+kime/93AHVKeE29lQNNr; Original-Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:35580 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fehMF-004N0T-Vq; Sun, 15 Jul 2018 08:46:40 -0500 X-Attribution: Tom In-Reply-To: <86k1pxmvmx.fsf@gmail.com> (Andy Moreton's message of "Sat, 14 Jul 2018 21:04:38 +0100") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.85.72 X-Source-L: No X-Exim-ID: 1fehMF-004N0T-Vq X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-85-72.hlrn.qwest.net (bapiya) [75.166.85.72]:35580 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.143.31 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227427 Archived-At: >>>>> "Andy" == Andy Moreton writes: Andy> b) Use 64bit long long for EMACS_INT, and do extra work to pass native Andy> values into GMP in two halves, i.e. something like: Andy> EMACS_INT i; Andy> mpz_t val, tmp; Andy> mpz_init_set_si(val, (i >> 32)); Andy> mpz_mul_2exp(val, val, 32); Andy> mpz_init_set_si(tmp, (i & 0xffffffff); Andy> void mpz_ior(val, val, tmp); Andy> mpz_clear(tmp); I was thinking this is what I' have emacs do when sizeof(EMACS_INT) > sizeof(long). Tom