49 points · by todsacerdoti · 2y ago · 33 comments
That being said, the larger register set, the register-based calling convention, SSE2 for floating point math, PC-relative addressing (important for shared objects) together usually compensate the cost of wider pointers. Unless your workload happens to be pointer-heavy and fit into slightly less than 4 GiB of address space.
It is supported, but the list of broken packages is rather long... [1]
You don't need an official build, as Gentoo builds itself and also cross-builds itself for any target and any ABI. In this case, you don't even need a cross-build.
Just install Gentoo x86_64 multilib, enable x32 support in kernel, enable abi_x86_x32 USE flag for the packages you want to test and run emerge to build them. They won't even interfere with the rest of the running system. See [2].
[1] https://github.com/gentoo/gentoo/blob/master/profiles/arch/a...
EDIT: And several of those packages are binaries. Apart from the *-bin packages, I've identified TeamSpeak, dev-libs/amdgpu-pro-opencl, Skype, and Slack. That leaves 138 packages.
You're right about firefox though, which is weird. Apparently node is a build dependency, but I can't figure out if that's something specific to the ebuild (that Arch's PKGBUILD does as well) or just generally something the buildsystem requires, but it's not listed as a dependency at https://firefox-source-docs.mozilla.org/setup/linux_build.ht....
Now, in 2024, 32 bit cell phone CPUs seem like a distant memory and nobody remembers what the hell x32 was even for.
Realistically, Windows is the platform keeping 32 bit code alive, in the form of all those legacy binaries. MacOS and Linux have moved on. So if you design something new for 32 bit that can't be used by Windows, it's DOA.
Which distro is this ? In debian I'm pretty sure CONFIG_X86_X32 was enabled in the kernel not too long ago, enabling this to work without issues. When I benchmarked it was on average 20% faster than x86_64 and used quite less memory for GUI apps IIRC - I think that for most utilities like coreutils, image viewers, file explorers, media players, etc. they'd benefit from it ; >4GB is only really meaningful for web browsers, compilers & interpreters, games and creative apps such as anything doing 3D, audio or large data processing.
A 20% penalty sounds insane, but I can very well believe it. What benchmarks did you run?
https://wiki.debian.org/X32Port
But, maybe support has gone away recently, too since upstream apparently was interested in removing support?
Yes, but...
> web browsers
...includes Electron, Cordova/PhoneGap, WebView-based UIs, et cetera.
So yes, so long as software-houses uncritically jump on Electron as their platform-of-choice then all those apps will also ultimately be "web browsers" in disguise
...even a simple utility to flash an SD card[1] is a 150MB behemoth... I'm dying inside at this point.
[1]: https://github.com/balena-io/etcher/releases/tag/v1.19.21
Meanwhile, I have a dozen firefox processes each above 500M RES and a few above 1G...
https://www.intel.com/content/www/us/en/developer/articles/t...
Everything else matches the 64-bit version - not the 32bit one - the instruction encoding, the extra registers, the minimum isa extensions (x86_64 puts a baseline of sse2), the calling convention advantages etc. etc.