From: Paul Eggert <eggert@cs.ucla.edu>
To: Emacs Development <Emacs-devel@gnu.org>
Subject: Emacs using SSE2 on x86
Date: Sat, 4 Jul 2020 09:27:11 -0700 [thread overview]
Message-ID: <cbd6afdd-f223-6679-e8f1-0b0a79ae0d64@cs.ucla.edu> (raw)
Bug#42147 reports that Emacs floating-point rounds differently on x86 than on
all other platforms, and in its Message #104 I propose a patch to fix this by
using GCC's -msse2 -mfpmath=sse options. This patch is needed on GNU/Linux
systems; it should be irrelevant on macOS (where SSE2 has always been required)
or on MS-Windows development systems (where SSE2 has been the default since 2012).
The patch cajoles GCC and similar compilers into using 64-bit floating point
instead of erratically substituting 80-bit floating point. Although using 80
bits can improve accuracy, it means the numbers disagree with other platforms
and (as Bug#42147 notes) this is more of a problem for Emacs than any lost accuracy.
The patch relies on SSE2 instructions on the x86, which were introduced in 2000
and which have by now become universal. I don't see a downside of requiring SSE2
for GCC etc., because as far as I can see, in the GNU/Linux world the only
people running 32-bit Emacs on Intelish platforms nowadays are using AMD64 Linux
kernels and compiling with 'gcc -m32', and AMD64 requires SSE2 anyway. However,
I thought I'd mention this on emacs-devel in case I'm missing something.
next reply other threads:[~2020-07-04 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-04 16:27 Paul Eggert [this message]
2020-07-04 18:58 ` Emacs using SSE2 on x86 Sven Joachim
2020-07-04 19:19 ` Eli Zaretskii
2020-07-04 23:07 ` Andrea Corallo via Emacs development discussions.
2020-07-04 21:10 ` [OFFTOPIC] " Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cbd6afdd-f223-6679-e8f1-0b0a79ae0d64@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=Emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).