this post was submitted on 20 Aug 2023
151 points (93.1% liked)
Linux
48376 readers
1095 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Apple designed the silicon to have an "x86 mode" for the memory model ordering, as well as an undocumented mode that makes certain arm instructions set flags similarly to x86. There's a good write up of the reasons here: https://dougallj.wordpress.com/2022/11/09/why-is-rosetta-2-fast/
Apple hit a sweet spot with this. x86_64 applications run at acceptable speed (making the transition easy for people who buy the hardware) while not being SO good that there's zero reason for developers to start porting their software.
Small correction: the flag setting modes aren't undocumented. They're standardized extensions. ARMv8.4 added
FEAT_FlagM
, and ARMv8.5 addedFEAT_FlagM2
.https://developer.arm.com/downloads/-/exploration-tools/feature-names-for-a-profile
IIRC, the only nonstandard ARM extension used by Rosetta 2 in Apple's processors is TSO, and that's also implemented by other manufacturers. It's also not a hard requirement to run
amd64
under ARM. You can emulate it very slowly or restrict the application to a single core.Apologies for the tangent, but I needed to make sure nobody could defend Microsoft's prior failings by saying "but Apple has secret hardware sauce".
So while not technically "secret sauce," it's certainly "special sauce." Good point.