News for hackers. Stuff that matters.
Re:RISC in 2022 by fulafel on Saturday October 22, 2022 @07:59AM (#33297545)
> RISC was a set of design principles developed in the 1980’s that enabled hardware to get much faster and more efficient. We tend to still call modern-looking instruction sets “RISC-y”, but really, a bunch of the original design principles of RISC CPU’s have not stood the test of time. So let’s look at the things that have worked and not worked between the 1980’s and 2022.

I think the design principles of RISC were actually on a meta level above this: take the quantitative approach, use your transistors to best serve the software you have and compilers you can build. "Nice ISA to write assembly code for" was thrown out, or at least demoted significantly.

In that 80s moment in the transistor count curve, it meant simplifying the ISA very radically in order to implement fewer instructions in hard coded way without microcode, to the point of ditching HW multiply instructions. The microarchitecture could either do fast, pipelined execution or large instruction set in the transitor budget, you optimized for bang for the buck in the whole-system sense. You could make simple fast machines that were designed to run Unix (so had just enough VM, exception, etc support).

Re:RISC in 2022 by klelatti on Saturday October 22, 2022 @08:11AM (#33297618)
Largely agree with you here but I think there were two other factors in RISC's early success:

1. As microprocessors became dominant freezing complex microcode - with possible bugs - on an IC was a really bad idea. Better to run with simpler instructions and less microcode.

Look at the debugging issues that National Semiconductor had with the NS32016 - which I think really hindered its adoption.

2. You needed a much smaller team to design a RISC CPU - low double figures for IBM 801, Berkeley RISC, MIPS and Arm. This opened the door to lots of experiments and business models that would not have been possible with CISC.

Re:RISC in 2022 by _0ffh on Saturday October 22, 2022 @10:22AM (#33298539)
Yep, RISC is really a KISS CPU, paired with the attempt to draw the maximal advantage from the potential strengths of the underlying concept. And it turned out pretty nicely imho.
Re:RISC in 2022 by sitkack on Saturday October 22, 2022 @03:04PM (#33301138)
Almost no systems use fixed microcode.

What RISC took advantage of was decoupling the memory bus from the CPU clock rate and the introduction of instruction and data caches.

RISC is a simple interface, but the internal processor complexity is as high or higher than CISC (thanks to RISC simplicity). Speculative execution, reordering instructions, hazards, branch prediction these issues are the same across both.

The front end isn't this huge deal. CPUs all do the same thing, attempt to unroll huge state machines and compress time. The ISA is just a way to get that problem into the CPU.

Re:RISC in 2022 by klelatti on Saturday October 22, 2022 @03:15PM (#33301234)
The key word in my comment is ‘early’. You’re right about architectures today but that explicitly wasn’t what I was talking about. Caches we’re important in the IBM 801 but your orher points don’t apply to early RISC designs.
Re:RISC in 2022 by sitkack on Saturday October 22, 2022 @03:35PM (#33301392)
RISC didn't hit its stride until the early 80s, using caches. The 801 was an experiment. When the 801 shipped, almost no system had hard coded microcode. Being able to update microcode in the field isn't the reason RISC thrived.
Re:RISC in 2022 by klelatti on Saturday October 22, 2022 @04:13PM (#33301768)
I can think of at least two of the RISC pioneers who have cited buggy CISC architectures / microcode as a key motivating reason for adopting RISC.

I actually cited an example of a major CISC design that basically failed because it was so buggy.

The early microprocessors all had hard coded microcode - Intel only had upgradeable microcode with P6 in the mid 1990s.

I didn't say that it was the reason - there were many reasons - but that it was one factor. It was absolutely the case that original RISC designs were simpler to design and that helped them to get traction.

Re:RISC in 2022 by abiloe on Saturday October 22, 2022 @10:44PM (#33304109)
> When the 801 shipped, almost no system had hard coded microcode.

1990? No system without soft microcode? That's a very restricted definition of system for the field of computing in 1990.

Re:RISC in 2022 by skissane on Saturday October 22, 2022 @11:15PM (#33304260)
> When the 801 shipped, almost no system had hard coded microcode.

Intel 8086 was introduced in 1978, with hardcoded microcode. Intel didn’t introduce microcode patching support until the Pentium Pro in 1995.

Re:RISC in 2022 by sitkack on Tuesday October 25, 2022 @01:17PM (#33333458)
Intel chips were not "systems", they were disposable microprocessors. Systems have updates and field support personnel. Lousy counterfactuals sleep furiously.
Re:RISC in 2022 by bogomipz on Saturday October 22, 2022 @12:53PM (#33299939)
>"Nice ISA to write assembly code for" was thrown out, or at least demoted significantly."

Interesting. Was the guiding principle of CISC ISAs essentially that be easy to write assembly code for then? Maybe it's obvious but I had never considered how or where CISC evolved from. Would I have to look at something like the history of the VAX ISA to understand this better?

Re:RISC in 2022 by klelatti on Saturday October 22, 2022 @01:13PM (#33300115)
I think 'easy to write assembly code for them' might be stretching it a little bit. Some instructions were pretty complex and I would expect be quite hard to use in practice.

What is certainly true is that a single instruction could do a lot, making for much more concise code than would be the case for RISC code.

IBM S/360 is probably the most influential CISC architecture. There is lots of S/360 documentation online. If of interest I did a short post on S/360 assembly a little while ago.

https://thechipletter.substack.com/p/writing-ibm-s360-assemb...

Re:RISC in 2022 by bogomipz on Saturday October 22, 2022 @02:40PM (#33300880)
Thanks but your link has a brief into paragraph followed by an input box to subscribe to your newsletter and by the time I made it to there I was interrupted by an obnoxious pop up prompt to again sign up for the newsletter. Is there a reason to be this aggressive? It's hard to believe this is a successful strategy. If someone enjoys your content they will sign up after they've actually been able read the article. Who signs up for a newsletter before they've even been able to read the first paragraph? I didn't bother with the rest of your link after this.
Re:RISC in 2022 by klelatti on Saturday October 22, 2022 @02:46PM (#33300941)
Thanks for letting me know. It’s a Substack thing not something I’ve chosen to do - I’ve tried to see if I could could turn off all pop-ups in the past without success. I didn’t know it was quite that bad so will have another look and possibly feedback to Substack.
Re:RISC in 2022 by bogomipz on Saturday October 22, 2022 @07:26PM (#33303154)
Sorry I didn't mean to imply that this was your choice. It was a general rant against the sorry state of these platforms that get in the way of the very product they are supposed to be promoting. It sounds like content I would be very interested in. Do you have a blog or somewhere else where this content also lives? Cheers.
Re:RISC in 2022 by klelatti on Sunday October 23, 2022 @09:46AM (#33306973)
I actually owe you a huge thank you for pointing out how bad the experience was!

I genuinely had no idea how awful it was - of course you don't see pop-ups if you are logged in. To be fair to Substack the control to turn off pop-ups was there but it was turned on by default and a bit buried away in the UI.

I've removed any mid-article calls to action and turned off pop-ups now so hopefully a much better and less aggressive experience.

On the S/360, the article I linked too was a short look at how complex some S/360 instructions were and at how assembly used to be written using pen and paper. If you're interested in more on S/360 Assembly then the principles of operation may be worth a scroll through.

Thanks again - really appreciate that you fed back rather than just closing your browser window.

[1] http://bitsavers.org/pdf/ibm/360/princOps/A22-6821-0_360Prin...

Re:RISC in 2022 by flopsamjetsam on Sunday October 23, 2022 @03:05AM (#33305154)
Great little article. My image of CISC was "complex addressing modes," not something as complex as the EDIT instruction.
Re:RISC in 2022 by klelatti on Sunday October 23, 2022 @09:47AM (#33306977)
Thanks - really appreciate that. S/360 is something else!
Re:RISC in 2022 by pjmlp on Saturday October 22, 2022 @04:25PM (#33301874)
Yes, with CISC instructions and powerful macro assemblers like TASM and MASM.
Re:RISC in 2022 by sroussey on Saturday October 22, 2022 @12:54PM (#33299957)
You mention the key part here—it was designed for compilers writing assembly, not people writing assembly.

And more importantly, future compilers, not the tech they had at the time.

Re:RISC in 2022 by pclmulqdq on Saturday October 22, 2022 @05:09PM (#33302257)
This is probably the most important factor in the RISC revolution. The printed size of assembly doesn't matter any more (only the number of bytes), and neither does readability.
Re:RISC in 2022 by gumby on Saturday October 22, 2022 @02:53PM (#33301009)
> I think the design principles of RISC were actually on a meta level above this: take the quantitative approach, use your transistors to best serve the software you have and compilers you can build. "Nice ISA to write assembly code for" was thrown out, or at least demoted significantly.

You have it right: this is almost exactly (in different words!) what Radin wrote in his original RISC paper.