From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.devel
Subject: Re: [PATCH] Change module interface to no longer use GMP objects
directly.
Date: Sun, 8 Dec 2019 21:28:12 +0100
Message-ID:
References:
<20191117183828.82379-1-phst@google.com>
<089f3d06-e227-27da-c8fe-afcbbbbc934a@cs.ucla.edu>
<10cefdff-38ce-438b-881d-15d2fe816a8b@cs.ucla.edu>
<3d727645-911e-fc71-1f86-364aa82d06ba@cs.ucla.edu>
<287b5f71-75eb-bae2-4f6e-01cce6f07b02@cs.ucla.edu> <87sgmdmxn9.fsf@hase.home>
<3479c610-17b7-579c-8109-f7f5d237dcc2@cs.ucla.edu>
<83k17aj0je.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226";
logging-data="203488"; mail-complaints-to="usenet@blaine.gmane.org"
Cc: Philipp Stephani , Paul Eggert ,
Andreas Schwab ,
Stefan Monnier ,
Emacs developers
To: Eli Zaretskii
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 08 21:29:22 2019
Return-path:
Envelope-to: ged-emacs-devel@m.gmane.org
Original-Received: from lists.gnu.org ([209.51.188.17])
by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.89)
(envelope-from )
id 1ie3BB-000ql9-Fd
for ged-emacs-devel@m.gmane.org; Sun, 08 Dec 2019 21:29:21 +0100
Original-Received: from localhost ([::1]:33232 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1ie3BA-0001Bs-9A
for ged-emacs-devel@m.gmane.org; Sun, 08 Dec 2019 15:29:20 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37632)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from ) id 1ie3AO-00018n-B5
for emacs-devel@gnu.org; Sun, 08 Dec 2019 15:28:33 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1ie3AN-0002qL-7i
for emacs-devel@gnu.org; Sun, 08 Dec 2019 15:28:32 -0500
Original-Received: from mail-oi1-x242.google.com ([2607:f8b0:4864:20::242]:33383)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1ie3AI-0002hP-Ot; Sun, 08 Dec 2019 15:28:26 -0500
Original-Received: by mail-oi1-x242.google.com with SMTP id v140so4571468oie.0;
Sun, 08 Dec 2019 12:28:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=i1cegncKaQkARUCWXHKRx8tVbM077PWP0B7JuBrRqdY=;
b=mFNW8xPBS5cYSrxAAQuBxkqFF+WQm/RYBKLzkT5miHRA1ICaFOnVMT6jkcLSCGlWkj
kP8E0Iy4RkgFAax/+kUNkDt3eKXi8tJ2AMJw+unIZIG3tWbUXIKMVtbg5TuilXM/N52D
bklqeCU3hhOIidfUoSlgfb88NGoMjl/E4eqiB8SFQlN2Yz41COFdOfHxvYHLiA9gRQQI
qFmOuut5QIRXGX7aGt7CfE2xeK/q8a5iffZpeG5K7DxWFD6AxDiGkn1CpkFr5TjiJkR3
ktOaT/J7jzA3AxixY9GWj2hsk+MvGAmkX4XC4/peIKzamWazXEqUC2hsgu0ydjlITo0u
Ro2Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=i1cegncKaQkARUCWXHKRx8tVbM077PWP0B7JuBrRqdY=;
b=nvR4+pbajj1I31YCKHcM6V1Xi9mSDfm1kGy41rbB8O7PalYJWWtB4IE+EZrE0OoFXT
O5aitlb10ZcvBxyjluk+8soav0Hv02kV7PMjb/DkleIdoFRK8qPjswug3N/Xz9rHoh6U
eOhud5ruFlR3WJ4zkz6htD7nW6Boa5YxY7l89laCapNm43pyYUW12HPwLbhrGHBcifqp
aIoSYsCsBPyxAGAJ6s8aJ1I76WVyBZENHEL8kOMEazxG45COluoN4vdMGdxF/0bMpCgH
0NE9zuzaLCSAD954xQeEfzsWjm/Rj7x7ojycxg/mhsjGahlPc5Wz2zmICNzux9heirYW
KP5Q==
X-Gm-Message-State: APjAAAVJ5RjxVWzYHV6BpqeI90tRNozTYyhgj7zr+3w6mRNBJkXiZ0ex
iKbqF8Q6zfDfeMQWEClIZEIDYHaglRagfxnaGnPE1w==
X-Google-Smtp-Source: APXvYqyDJuL+i8c07NY3fvOwE0Dnim5KVK7jfIyki9JIH46jq2DBJz0+hdWbsIoE2aHS2mmoBv0GKSVkmMP+ja4rl4Y=
X-Received: by 2002:aca:4911:: with SMTP id w17mr21972255oia.170.1575836903976;
Sun, 08 Dec 2019 12:28:23 -0800 (PST)
In-Reply-To: <83k17aj0je.fsf@gnu.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
recognized.
X-Received-From: 2607:f8b0:4864:20::242
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.23
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:243242
Archived-At:
Am Do., 5. Dez. 2019 um 15:43 Uhr schrieb Eli Zaretskii :
>
> > From: Philipp Stephani
> > Date: Wed, 4 Dec 2019 21:31:42 +0100
> > Cc: Philipp Stephani , Andreas Schwab ,
> > Stefan Monnier ,
> > Emacs developers
> >
> > Since there were no more comments or objections, and all other points
> > of discussion have been resolved, I've pushed a slightly modified
> > version of the patch as 096be9c454. Except for extremely exotic
> > architectures or custom GMP builds, the chosen limb should be the same
> > as the default GMP limb.
>
> Thanks.
>
> However, this:
>
> #if ULONG_MAX == 0xFFFFFFFF
> typedef unsigned long long emacs_limb_t;
> # define EMACS_LIMB_MAX ULLONG_MAX
> #else
> typedef unsigned long emacs_limb_t;
> # define EMACS_LIMB_MAX ULONG_MAX
> #endif
>
> seems to punish every 32-bit build of Emacs (and on MS-Windows even
> the 64-bit builds, AFAIU). Is there a reason for doing this? Testing
> for the native size of an 'unsigned long' data type is not
> significantly more complicated than the above, and GMP goes with that
> when it determines the type of mp_limb_t, AFAIK.
Not quite sure I understand. In what way does this selection punish
32-bit builds? Also the code already effectively tests the native size
of unsigned long, so I'm not sure what you'd like to change here.