WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
223987
Hard dependency on SSE2 instruction set for i386 platform (32-bit Intel / x86)
https://bugs.webkit.org/show_bug.cgi?id=223987
Summary
Hard dependency on SSE2 instruction set for i386 platform (32-bit Intel / x86)
Chris Parker
Reported
2021-03-31 00:46:11 PDT
In previous bugs on this same issue like
Bug #188145
(2018), it was emphasized: Quote Michael Catanzaro, developer at Igalia[1]: "For WebKitGTK+, SSE2 instructions are forbidden (except when building for x86_64) because that's what our distributors require. But I doubt all developers are aware of this, and I also doubt anybody ever tests on such old hardware. So it might require some effort to audit the codebase for unwanted SSE2 instructions to make sure they're not there and fix them if so." We are now 3 years later, but apparently SSE2 on the x86 platform is back with little regard for that comment. The CMAKE configure itself is now enabling SSE2 in the code generation! Using the source tarball posted at
https://webkitgtk.org/
(which involves installing a ton of dev packages one at a time), I built the WebKitGTK v2.32.0 (latest stable). However, I found this logic in use when setting up the C flags: Source/cmake/WebKitCompilerFlags.cmake: # Force SSE2 fp on x86 builds. if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING) WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse) include(DetectSSE2) if (NOT SSE2_SUPPORT_FOUND) message(FATAL_ERROR "SSE2 support is required to compile WebKit") endif () endif () Any doubt if this is actually in use is dispelled, both because I find the '-msse2' actually appearing on the C++ compiler command line throughout the build, as well as of course the actual test on a Pentium III (SSE-only processor) laptop using Python 3.6: $ python3 Python 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.
>>> import gi >>> gi.require_version('WebKit2', '4.0') >>> from gi.repository import WebKit2 >>> context = WebKit2.WebContext.get_default()
Illegal instruction $ Honestly, I do not understand what the motivation has been over the last few years leading to new adoption of the SSE2 instruction set on the 32-bit platform. SSE2 came out from Intel in 2004 (that's 17 years ago) at about the same time as x86-64 (64-bit Intel) architecture, and until recently it's only been used on 64-bit systems. It provides a modest performance boost, that's all, as far as I understand it. In most cases, all this is doing is obsoleting the older systems that are still in use. WebKitGtk is used in a lot of places, including the Midori lightweight web browser (the kind of thing an older machine needs to use) and even 'ubiquity', the installer program for the Ubuntu operating system and its derivatives (it's used to display the slideshow). That last one is where this burned me up, as I couldn't even install Linux properly on the old machine because of new SSE2 use. Is SSE2 really needed for WebKitGtk? Or, can I simply change the compiler flag in that Makefile to "-sse" and now my WebKitGtk will run just fine on SSE-only hardware such as the Pentium III?
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2023-03-29 06:47:31 PDT
Looks like this was intentionally made mandatory in
bug #196488
. My $0.02: nowadays almost all Linux distros that build i686 packages do so only to support i686 multilib/multiarch on x86_64 processors. The biggest distro that still targets i686 is Debian and Debian does not want SSE2 in its i686 builds. Therefore, we should not require SSE2 on i686 even if that means WebKit will be slower. But based on how little attention this bug has received in the past four years, I guess very few people care about this hardware anymore.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug