Comment by jezek2

Comment by jezek2 5 hours ago

6 replies

You can do it with HW accelerated emulation like Apple did with M1 CPUs. They implemented x86 compatible behavior in HW so the emulation has very good performance.

Another approach was Transmeta where the target ISA was microcoded, therefore done in "software".

izacus an hour ago

Apple didn't implement x86 ISA in hardware, they have a few instructions that change memory behaviour to make emulation faster.

BlueToth 4 hours ago

They said that they implemented x86 ISA memory handling instructions, that substantially sped up the emulation. I don't remember exactly which now, but they explained this all in a WWDC video about the emulation.

  • als0 4 hours ago

    Not instructions per se. Rosetta is a software based binary translator, and one of the most intensive parts about translating x86 to ARM is having to make sure all load/store instructions are strictly well ordered. To alleviate this pressure, Apple implemented the Total Store Ordering (TSO) feature in hardware, which makes sure that all ARM load and store instructions (transparently) follow the same memory ordering rules as x86.

    • nineteen999 3 hours ago

      It is funny to hear sometimes though:

      "Apple created a chip which is not an X86! Its awesome! And the best thing about it is ... it does TSO does like an X86! Isn't that great?"

      • dontlaugh an hour ago

        Only some of the time.

        I think the last time I ran amd64 on my mac was months ago, a game.