Article View: comp.arch
Article #658Re: CISC are not "unreduced"
From: Anton Ertl
Date: Thu, 12 Nov 2026 06:21
Date: Thu, 12 Nov 2026 06:21
89 lines
5872 bytes
5872 bytes
Stefan Monnier <monnier@iro.umontreal.ca> writes: >Yeah, if we take CISC as motivated by the desire to provide an assembly >language that is comfortable for humans, we can also take RISC as >motivated by the desire to provide an assembly language that's >convenient for compilers (which would rather not need to worry about >tradeoffs between using LD+ADD+ST vs using some fancy addressing mode >on ADD). The fancy addressing mode is the same whether you use it with a LD, a ST, or an ADD. Compilers actually have no problem using that addressing mode, especially in an architecture like VAX: When the variable resides in a register, use a register, when it's in memory, use the appropriate addressing mode. It's just that with the 16 registers of S/360 and a compiler that allocates variables into registers, most accesses are to registers. And the more fancy addressing modes are not difficult for the compiler, either (optimality is more difficult, but for trees has been reached with tree-parsing, as used in burg or iburg). But these addressing modes are not used much, not by compilers, nor by humans (IIRC the IBM 801 group looked at existing S/370 code), because the corresponding access patterns are not used much. The IBM 801 group included hardware and compiler people, so they were aware of what compilers could do, and also what hardware would run fast, and when they aimed to achieve a very fast machine, they created at RISC. The Berkeley RISC projects included no compiler people, and they just wanted to avoid the complexities of architectures like VAX, and also arrived at RISC (but with register windows). The Stanford MIPS projects included compiler people, so they worked on designing an architecture that leaned on compilers, in particular including architectural load-delay slots. One famous example of a CISC instruction is the VAX CALL instruction, famous for its slowness. Compilers had no problem generating it. It just was faster to use something based on BSR. But I think that the compiler that used BSR for better speed instead also used a different calling convention that did not have all the features of the VAX CALL, which gave cross-language support for various tools such as debuggers. We have learned how to do such tools with the more efficient calling conventions we use now, but that does cost a lot of complexity in the tools: Generating and using DWARF information etc. Ok, DWARF is not just about calling conventions, but it might be interesting to consider how much simpler debugging information would be with VAX CALLs. In any case, the minimum configuration for a VAX apparently was 128KB (one memory controller with the minimum amount of memory), so having one CALL instruction with a calling convention that made it easy to write a cross-language debugger was a benefit that the VAX architects considered worth the performance cost. They also provided BSR, if speed was more important than debugability (probably for helper routines). >From that point of view, AES is neither CISCy nor RISCy because it's >convenient only for the CPU implementors. AES instructions are not particularly convenient for CPU implementors, probably on the contrary, because they need hardware that is not useful for anything else. But they are useful for the performance of the typical application mix. They tend to be used in libraries, using asm statements or (equivalently) intrinsics. Could a compiler generate them? It could use pattern-matching to recognize one or a few ways of coding AES. But I doubt that anybody has done that. Why waste development budget (and later compile-time budget) on such pattern-matching, when it's easier for the programmer to write down the asm statements/intrinsics than the code in the base language? Likewise, the famed POLY instruction of VAX is there for library use, in particular for implementing transcendental functions, not because it's something that programmers used often in raw form. >[ In contrast, vVM is definitely RISCy from that standpoint. ] VVM is a microarchitectural mechanism, so architectural concepts like RISC and CISC are inappropriate for that. You may want to discuss the VEC and LOOP instructions of MY 66000. - anton -- 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.' Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
Technical Details
Message-ID:
<2026Nov12.072121@mips.complang.tuwien.ac.at>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11cpqih$acf5$1@dont-email.me> <11cr2g5$q796$2@dont-email.me> <2026Nov9.071302@mips.complang.tuwien.ac.at> <11cru1e$11qpi$1@dont-email.me> <2026Nov9.091404@mips.complang.tuwien.ac.at> <11cti0c$1lilf$4@dont-email.me> <11cuoa4$21279$1@dont-email.me> <jwvcxscsjsa.fsf-monnier+comp.arch@gnu.org> <1794357499-5857@newsgrouper.org> <jwvik23o10u.fsf-monnier+comp.arch@gnu.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.arch Subject: Re: CISC are not "unreduced" Date: Thu, 12 Nov 2026 06:21:21 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 89 Message-ID: <2026Nov12.072121@mips.complang.tuwien.ac.at> References: <11cpqih$acf5$1@dont-email.me> <11cr2g5$q796$2@dont-email.me> <2026Nov9.071302@mips.complang.tuwien.ac.at> <11cru1e$11qpi$1@dont-email.me> <2026Nov9.091404@mips.complang.tuwien.ac.at> <11cti0c$1lilf$4@dont-email.me> <11cuoa4$21279$1@dont-email.me> <jwvcxscsjsa.fsf-monnier+comp.arch@gnu.org> <1794357499-5857@newsgrouper.org> <jwvik23o10u.fsf-monnier+comp.arch@gnu.org> Injection-Date: Thu, 12 Nov 2026 07:21:50 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3921468"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ARa4rcOkFADVuc/UIeS4I"; posting-host="6d7b862d87f7a03985454cab60ca3edf" Cancel-Lock: sha1:umAUgdmvNFWD7j+zt1XiKOe/4CY= sha256:DIv+JjDzG+RvZLIeji/zUcAu2bobiMMDao3ajnk80Fs= sha1:w4uFKpvadztdTUnAmRCCYHfxWLk= sha256:yzAvkX9o5hsm/Xxfg9IKEDf89bEThbOUbdAk+lBGgvo= X-newsreader: xrn 10.11