←back to thread

283 points walterbell | 1 comments | | HN request time: 0.2s | source
Show context
heavyset_go ◴[] No.45769401[source]
I want a hybrid APU, perhaps an x86 host with ARM co-processors that can be used to run arm64 code natively/do some clever virtualization. Or maybe the other way around, with ARM hosts and x86 co-processors. Or they can do some weird HMP stuff instead of co-processors.
replies(4): >>45769444 #>>45769575 #>>45769593 #>>45775177 #
ggm ◴[] No.45769575[source]
Rosetta shows translation works. Why complicate the os with multiple ISA?
replies(1): >>45769905 #
jillesvangurp ◴[] No.45769905[source]
Or put differently, why bake the CPU instruction sets into the chips? What Apple has shown is that emulating x86 can actually rival or be faster than a natively running x86 chip. There are currently two major ones (ARM, x86) and an up-and-coming minor one (e.g. RISC-V), and lots of legacy ones (SPARC, MIPS, PowerPC, etc.). All these can be emulated. Native compilation is an optimization that can happen at build time (traditional compilers), at distribution time (Android stores do this), just before the first run (Rosetta), or on the fly (QEMU).

Chip manufacturers need to focus on making power-efficient, high-performance workhorses. Apple figured this out first and got frustrated enough with Intel, who was more preoccupied with vendor lock-in than with doing the one thing they were supposed to do: developing best-in-class chips. The jump from x86 to M1 completely destroyed Intel’s reputation on that front. Turns out all those incremental changes over the years were them just moving deck chairs around. AMD was just tagging along and did not offer much more than them. They too got sidelined by Apple’s move. They never were much better in terms of efficiency and speed. So them now maybe getting back into ARM chips is a sign that times are changing and x86 is becoming a legacy architecture.

This shouldn’t matter. Both Apple and Microsoft have emulation capability. Apple is of course retiring theirs, but that’s more of a prioritization/locking strategy than it is for technical reasons. This is the third time they’ve pulled off emulation as a strategy to go to a new architecture: Motorola 68000 to PowerPC to x86 to ARM. Emulation has worked great for decades. It has broken the grip X86 has had on the market for four decades.

replies(1): >>45771563 #
cesarb ◴[] No.45771563[source]
> Or put differently, why bake the CPU instruction sets into the chips?

There is more to a CPU instruction set than just instruction encodings. For instance, x86 has flags which are updated (sometimes partially) by a lot of instructions, and a stronger memory model (TSO), while RISC-V has its own peculiar ideas on the result of an integer division by zero.

> What Apple has shown is that emulating x86 can actually rival or be faster than a natively running x86 chip.

AFAIK, Apple has special support in its processors for emulating x86. It has a hardware mode which emulates the x86 memory model, and IIRC also has something in hardware to help emulate the x86 flags register.

replies(2): >>45774109 #>>45775891 #
1. snvzz ◴[] No.45774109[source]
>while RISC-V has its own peculiar ideas on the result of an integer division by zero.

Yeah, it does. Its architects knew that it is cheaper to, when necessary, check and branch if the divisor is zero than it is to deal with exceptions.

Thus that hardware budget can instead be used for making the chip faster and more power efficient.