Remix.run Logo
vnorilo 4 hours ago

And yet modern assembly does not correspond 1:1 to the micro-ops the CPU runs or even necessarily the order in which they run.

Both ISA-level assembly and C are targeting an abstract machine model, even if the former is somewhat further removed from hardware reality.

arghwhat 3 hours ago | parent | next [-]

Java also targets an abstract machine model (JVM) - such statement really doesn't mean much.

Assembly is not about corresponding to exactly which gates open when in the CPU. It's just the human writable form of whatever the CPU ingests, whereas C is an early take on a language reasonable capable of expressing higher level ideas with less low-level noise.

I seriously doubt anyone who has written projects in assembly would make such comparisons...

cylemons 3 hours ago | parent | prev | next [-]

Sure but from software POV assembly is the lowest level you can target

flohofwoe 3 hours ago | parent | prev | next [-]

> And yet modern assembly does not correspond 1:1 to the micro-ops the CPU runs or even necessarily the order in which they run.

It's still much closer to the input machine code compared to what compiler optimizer passes do to your input C code ;)

IshKebab 3 hours ago | parent | prev [-]

> And yet modern assembly does not correspond 1:1 to the micro-ops the CPU runs or even necessarily the order in which they run.

Nobody claimed that. It corresponds to the instructions the CPU runs and their observable order.

Also it's really only x86 that uses micro-ops (in the way that you mean), and there are still plenty of in-order CPUs.