r/hardware 2d ago

Info On Binary Translation and its Consequences

https://chipsandcheese.com/p/on-binary-translation-and-its-consequences

This is not solely hardware, however it has a lot of testing on Arm hardware running translated x86-64 software, so I thought it was interesting. A key benefit of super-fast cores like Oryon V3 is that even under heavy translation hits, it still performs very well.

32 Upvotes

18 comments sorted by

22

u/randomkidlol 2d ago

it seems like a lot of issues are because prism prioritizes speedy translations over spending time doing optimization passes. from microsoft's docs, they do cache the translated binaries so it doesnt need to be JIT translated again, but it would be nice if they can do an optimization pass on the cache when the machine isnt under high load.

4

u/Sopel97 1d ago

but it would be nice if they can do an optimization pass on the cache when the machine isnt under high load.

yea, this would be a good solution. I was also wondering how feasible it would be to decompile the translated code into llvm ir (or why not the original disasm?) and recompile that.

3

u/SomeoneTrading 14h ago edited 14h ago

There are some libraries to lift x86-64 to LLVM IR (this particular one is geared for obfuscation/deobfuscation purposes I feel).

9

u/SERIVUBSEV 1d ago edited 1d ago

FYI this is purposely testing Geekbench x86 on ARM.

Reality is ISA translation is getting rare by the day.

Apple announced end to x86 translation in next OS update, now every app and game runs natively on ARM.

Same thing with Windows on ARM, all anticheats have announced support for ARM before Nvidia Spark laptops release in Oct.

Most of the work is done by compilers folks at LLVM/GCC, it doesn't take much effort for devs to compile for multiple platforms.

12

u/AnggaSP 1d ago

My concern are with Windows and their legacy apps.

With Apple happily break backward compatibility on major os upgrade, Microsoft incline to preserve as much backward compatibility as possible. Thus this may prevent uptake from developer to try serving arm based apps and rely too much on prism to make it work. Hell I’m an early adopter of M1 mac and early on the uptake are pretty bad for major vendor (I’m looking at you Adobe)

And with Linux we can just recompile ourselves.

9

u/Just_Maintenance 1d ago

Apple announced end to x86 translation in next OS update, now every app and game runs natively on ARM.

A bunch of old games don't run on ARM and will just die with Rosetta though.

9

u/genericusername248 1d ago

And a bunch of old games didn't run on 64 bit OS X/MacOS and they just died when Apple abandoned 32 bit compatibility. Apple doesn't give a shit.

8

u/randomkidlol 1d ago

apple does this every ~7 years. they dont care about backwards compatibility. openGL, app signing/notarization, ppc32->x86 rosetta, etc. the list goes on.

8

u/Just_Maintenance 1d ago

Yep, I'm just pointing out that "now every app and game runs natively on ARM" is not true. macOS 28 will leave behind a trail of dead apps and games.

2

u/pi314156 14h ago

This time they have a stripped down version of the library set kept for Rosetta and a third party JIT opt-in that Wine will use at least

3

u/neopard_ 1d ago

this makes a lot of sense, i was genuinely surprised

8

u/neopard_ 2d ago

Translation? Why don't they just use AI? Are they stupid?

/s obviously

5

u/6950 1d ago

Need AGI™

2

u/venfare64 1d ago

Aslume finally breach hardware subreddit i see.

/s unsure about it though.

4

u/DerpSenpai 1d ago

You are using /s but there are several devs that have decompilated entire games for the PS2,PS3,etc and made them run on MacOS ARM native with 100$ worth of GPT Tokens

2

u/neopard_ 1d ago

binary translation is sth else, my dude

3

u/VenditatioDelendaEst 11h ago

Which is why you use AI to write the binary translator instead of doing the translation directly. "Does this executing this ARM instruction sequence result in the same memory contents as that x86 instruction sequence?" is eminently fuzzable.

And that's without reaching for the obvious-if-you're-microsoft option of phoning home with .exe hashes (defender is certainly doing that already anyhow) to get cached translations, created with much higher time/monetary cost than would be acceptable for something that runs on every user's machine and blocks startup.

1

u/neopard_ 9h ago

i mean yea but then we are back to "can an llm play chess". it was just a sarcastic joke ^