News for hackers. Stuff that matters.
Re:The x86 architecture is the weirdo (2004) by aap_ on Tuesday April 19, 2022 @01:20AM (#31079956)
I wouldn't say the x86 is the weirdo in these cases, it's just not a RISC.
Re:The x86 architecture is the weirdo (2004) by marcosdumay on Tuesday April 19, 2022 @04:39PM (#31088762)
Notice that it's the only one remaining?

Yes, it's a weirdo.

Re:The x86 architecture is the weirdo (2004) by FullyFunctional on Tuesday April 19, 2022 @04:50PM (#31088915)
Not defending the weirdo, but IBM Z is a thing that is shipping, heavily used, and still evolving. It's more CISC than even x86.

I do find it sad that we are stuck in an 80 year old paradigm that is a horrible fit for how CPUs are actually implemented in 2022, but the inertia is a strong in this one.

Re:The x86 architecture is the weirdo (2004) by kosherhurricane on Tuesday April 19, 2022 @06:26PM (#31090162)
Inertia is the same as backward compatibility.

Kinda like gas engines and fuel pumps. Or wall socket formats. Inertia.

Re:The x86 architecture is the weirdo (2004) by FullyFunctional on Wednesday April 20, 2022 @01:21AM (#31093119)
I think you are illustrating my point, thanks. Gas engines are surely but slowly being replaced with much better, cleaner, and more efficient alternatives. Wall socket formats are there to stay but increasingly low DC loads are coalescing around USB, with USB-C really accelerating the change.

So yes, we can overcome inertia, it just take a lot of energy.

Re:The x86 architecture is the weirdo (2004) by astrange on Tuesday April 19, 2022 @08:11PM (#31091110)
ARM isn't a pure RISC anymore; it has complex addressing modes and arm7 has different instruction lengths. Complicated instructions are still worth adding if they happen to be hardware efficient, instruction fusing and cracking are expensive too and aren't optimization miracles.

I don't think RISC is a very useful term.

Re:The x86 architecture is the weirdo (2004) by aap_ on Tuesday April 19, 2022 @06:55PM (#31090458)
You mean as opposed to the other architectures mentioned in the article? ppc, mips, itanium and alpha. Two of which are utterly dead, one of which looks like it's dying (mips) and one that is little more than a niche product (ppc).
Re:The x86 architecture is the weirdo (2004) by colejohnson66 on Tuesday April 19, 2022 @08:44PM (#31091387)
It seems that MIPS has almost been entirely relegated to the academic space for courses on processor architecture
Re:The x86 architecture is the weirdo (2004) by thedeadfish on Tuesday April 19, 2022 @08:03PM (#31091049)
Implying that so called RISC cpus are actually RISC. There is nothing even remotely "reduced" about a modern ARM cpu.
Re:The x86 architecture is the weirdo (2004) by DaiPlusPlus on Tuesday April 19, 2022 @06:41PM (#31090328)
> Notice that it's the only one remaining?

Motorola 68K is still around too.

Re:The x86 architecture is the weirdo (2004) by zwieback on Tuesday April 19, 2022 @07:16PM (#31090641)
Came here to say that. At the time the post was written it was really just comparing x86 to the already dying RISC. Nowadays that comparison makes even less sense as the two schools of thought have more or less converged.
Re:The x86 architecture is the weirdo (2004) by lynguist on Tuesday April 19, 2022 @09:34AM (#31082861)
In essence, it is a RISC since the days of Pentium Pro. Each instruction is decoded to several micro-operations and the trick of making the CPU run fast lies in the decoder.

This also leads to situations where many instructions in x86 asm will run faster than fewer complex instructions which the decoder may not decode to its most optimal micro-operations sequence.

Re:The x86 architecture is the weirdo (2004) by saagarjha on Tuesday April 19, 2022 @04:54PM (#31088978)
No, this take is incorrect. x86-64 instructions do get lowered into µops, but all the common ones will only execute one, or maybe two. The real win for µops is letting Intel microcode instructions that nobody cares about, but you really shouldn't be using them anyways.
Re:The x86 architecture is the weirdo (2004) by phamilton on Tuesday April 19, 2022 @04:23PM (#31088525)
To what extent is the decoding consistent? It always felt weird to me that we'd do something in hardware on every execution that could be done once in software at compile time. But if the decoder does smart things that would make more sense to me. For example, with SMT the decoder could choose not to use certain ops if the compute units are in use by the other thread.
Re:The x86 architecture is the weirdo (2004) by astrange on Tuesday April 19, 2022 @08:12PM (#31091119)
That post isn't true, common instructions only take a few µops (or even one) and the main difference is register renaming. Microcoding mainly lets them support old and very complicated instructions that nobody actually needs to be fast.

You can see instruction latencies at https://www.agner.org/optimize/.

Re:The x86 architecture is the weirdo (2004) by buildbot on Tuesday April 19, 2022 @04:36PM (#31088715)
I am not sure of any arch that does this, but having a second stage decode buys 2 things off the top of my head - better instruction cache usage, esp. for small loops, and the flexibility to decode ops differently on different versions of the same arch from one binary. Otherwise you would have to have tons of different versions for each flavor of x86 out there.
Re:The x86 architecture is the weirdo (2004) by imtringued on Tuesday April 19, 2022 @06:32PM (#31090236)
Intel and AMD CPUs have micro op caches for tight loops.
Re:The x86 architecture is the weirdo (2004) by akira2501 on Tuesday April 19, 2022 @06:05PM (#31089912)
> on every execution that could be done once in software at compile time

Which is to me, essentially, VLIW. Those architectures didn't work out very well. There's a lot of memory pressure just to move instructions around and the costs didn't seem to outweigh the benefits.

Re:The x86 architecture is the weirdo (2004) by phamilton on Tuesday April 19, 2022 @10:35PM (#31092146)
The Mill CPU and architecture is a fascinating approach here. Who knows if we'll ever see a real piece of hardware from them, but as I understand it they require a compiler tuned to the exact cpu model to maximize on-die memory and other aspects.
Re:The x86 architecture is the weirdo (2004) by gpderetta on Tuesday April 19, 2022 @07:44PM (#31090858)
It is very inconsistent between major microarchitectural revisions, sometimes even between me minor steppings. Sometimes firmware updates can change the decoding (usually to fix bugs).
Re:The x86 architecture is the weirdo (2004) by Jasper_ on Tuesday April 19, 2022 @11:26PM (#31092480)
The firmware can only do this by turning on an extremely slow fallback path. It's not common and it's seen as an avenue of last resort.
Re:The x86 architecture is the weirdo (2004) by aap_ on Tuesday April 19, 2022 @06:57PM (#31090477)
That's an implementation detail. The submission was about architecture.