by api · 6y ago · 0 comments
Going from ARM to X64 is even less likely to have issues as X64 is more permissive about things like unaligned access.
People are making far too big a deal out of porting between the two. Unless the code abuses undefined behaviors in ways that you can get away with on one architecture and not the other, there is usually no issue. Differences in areas like strong/weak memory ordering, etc., are hidden behind APIs like posix mutexes or std::atomic and don't generally have to be worried about.
The only hangup is usually vector intrinsic or ASM code, and that is not found in most software.
For higher level languages like Go or Java, interpreted languages like JavaScript or Python, or more modern languages with fewer undefined edge cases like Rust, there is almost never an issue.
This is just not a big deal unless you're a systems person (like Linus) or developing code that is really really close to the metal.
Thus I encourage everyone to target more than one platform as it makes the total better. This even though there are platform specific issues that won't happen on the other (like the compiler bug we found)
I would be surprised if Apple didn’t have internal prototypes of macos running on their own Arm chips for the last several years. Most of the macos / iOS code is shared between platforms, so it’s already well optimized for arm.
Usually making the application run in the host OS is much more productive than dealing with the emulator/simulator.