Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Too bad Arm doesn't allow architectural licenses, because this is exactly the kind of thing Valve and the FEX developers would want to extend the ISA to support. I bet we see a RISC-V backend to FEX in the next 6 months, it probably already exists in a private repo.

FEX is the shootstring, extra special discount budget (not maligning) version of Rosetta. Apple should sell Rosetta to Valve.





My understanding is that Rosetta sidesteps a bunch of tricky memory model issues by using non-standard hardware extensions only present in Apple Silicon, so even if Apple did share Rosetta, which they certainly won't, it wouldn't work properly on Valves hardware anyway.

It's not only present in Apple Silicon, it's just not required by the ARM standard. Fujitsu also has an ARM64 CPU with TSO.

Nice article on this topic: https://lwn.net/Articles/970907/

There are a bunch of undocumented flags and instructions beyond TSO.

Trust me on this one?

https://dougallj.wordpress.com/2022/11/09/why-is-rosetta-2-f...

> Apple M1 has an undocumented extension that, when enabled, ensures instructions like ADDS, SUBS and CMP compute PF and AF and store them as bits 26 and 27 of NZCV respectively, providing accurate emulation with no performance penalty.


Oh yeah, maybe that one was too obscure for me. I don't think I've ever seen something use PF/AF…

You do want FEAT_AFP though, so you do want ARMv8.6+.


SETP is used rarely to compute parity, though it doesn't really save anything if you can use POPCNT. PF is also used by floating point comparisons with a different meaning though that is not useful for the Arm extension from Apple.

AF indeed is basically unused. The problem for both is that you need them for accurate emulation "just in case".


You can eliminate flag generation almost all the time with a little optimization (slash deoptimizing if you hit an unexpected use) but it certainly is less convenient to have to implement an optimizer.

Perhaps another interesting aspect of this is that it’ll be Apple with their vertical stack that will decide when to physically remove this logic from the chips.

macOS 26 is the last OS with an Intel build. Presumably this means that in all likelihood, M6 chips will remove this functionality.


Why do you assume that dropping support for Intel hardware from the OS will coincide with dropping hardware features that help support for x86 applications? Have you not seen Apple's documentation that states they plan to retain some Rosetta functionality beyond macOS 27 for the sake of x86 games?

I am not sure I consider it that likely.

First, these features are a big draw for developers (a key macOS audience).

Second, the ability to run Windows games is not getting less valuable.


There are also RISC-V designs with TSO. If you are targeting x86 workloads, it makes sense to have a per thread TSO mode.

yeah that is correct. The m series chips can turn on total store ordering memory model solely for Rosetta. There's also some hardware extensions to arm to support x86 condition codes in the hardware because it's way more instruction efficient that way.

The latter is now an optional feature in the mainstream Arm ISA now (FEAT_FlagM and FEAT_FlagM2). Similarly the “alternate floating point mode” that Apple uses to match nuances of x86 FP semantics is a standard architectural feature as well. The TSO option though is Apples own thing.

If you mean FEAT_FlagM, that's standard in ARMv8.4. (There's also FlagM2 and AFP that are optional.)

The JavaScript instruction is cooler though.

https://developer.arm.com/documentation/dui0801/g/A64-Floati...


RISC is dead; long live RISC

Box64 already runs on RISC-V. Just, the available processors are so slow it's hard to even play 5-10 year old games.

This means that, when the much faster chips implementing RVA23 arrive next year, they'll be immediately able to run Box64.

ARM already has most stuff required for this on board. Two proprietary extensions are used by Rosetta: one emulates the parity (rarely used) and half-carry (obsolete) flags, which can also be emulated conventionally. The other implementa TSO memory ordering, which can either be ignored or implemented with explicit barriers; some other chips apparently have a similar setting.

The other stuff is all present in ARMv8.5 I think.


You are looking for Felix86

https://felix86.com/


> Too bad Arm doesn't allow architectural licenses

QEMU exists. I doubt they want the bad press of suing an Open Source project everyone is using.


ARM were perfectly fine getting the bad press for suing Qualcomm for releasing the Snapdragon that was finally performing enough despite these companies paying them a lot of money.

They seemed quite happy to destroy their eco system if they won.

https://www.rcrwireless.com/20251001/business/qualcomm-arm-2


And GBA emulators. And before that, BBC Accorn ones with Risc OS.

better yet, Apple should make it open-source on github.

> Apple should sell Rosetta to Valve.

Isn't Rosetta kinda bad though? And won't get much better because it's not open source?


Rosetta performance is best in class to my knowledge, although they had the benefit of being able to add custom instructions and modes to the cpu to make some parts easier. Meaning Rosetta would not have helped valve unless they built the frame on apple silicon.

As for not improving, it is likely that Apple no longer feels the need to invest in Rosetta improvements now that Apple silicon is so dominant and software support is already very strong, but nothing is stopping them from investing in it if they need it for example for gaming


Rosetta is abandonware: https://developer.apple.com/documentation/apple-silicon/abou...

Why would a company on its way to the moon, entrust such an important project as translation layer between two major architectures to a single rinky-dinky corp that got rich selling common electronics marketed as luxury fluff, that's on the decline and has head so far stuck up its butt that it thinks it can do whatever it wants, instead of just write it themselves with support of the global developer community?

Apple could never do games because there are no luxury games. That's completely out of their zone of comprehensibility.


I don’t know if the two companies have such different futures.

The games industry as a whole is in potentially terminal decline, have you seen all of the redundancies lately?


The AAA games industry with their multi-million budgets and "being too big to fail" mentality is on decline. It seems that anything that is not a new Call of Duty is considered not worth by the industry.

But smaller games and indie studios are thriving. We got lots of very interesting indie games this year.


Games take years to make, as a consumer you’re seeing results from the past. Most indie studios are doing poorly, I know several that have closed and many friends looking for work.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: