unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs using SSE2 on x86
@ 2020-07-04 16:27 Paul Eggert
  2020-07-04 18:58 ` Sven Joachim
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2020-07-04 16:27 UTC (permalink / raw)
  To: Emacs Development

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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-04 23:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-04 16:27 Emacs using SSE2 on x86 Paul Eggert
2020-07-04 18:58 ` 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

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).