14 ms·
You might want to look up the ARM instructions "FJCVTZS" and "AESE", and "SHA256H". ARM is a CISC processor these days. AESE has a throughput of once-per-clock
by dragontamer 8y ago
You might want to look up the ARM instructions "FJCVTZS" and "AESE", and "SHA256H".
ARM is a CISC processor these days. AESE has a throughput of once-per-clock cycle, as well as "Floating Point JAVASCRIPT convert to signed rounding to Zero".
AESE is in particular a very "CISC" instruction, because it is usually macro-op fused with an AESMC instruction. The ARM decoder will look for AESE + AESMC instruction pairs and execute them as a single macro-op (kind of like how x86 joins "cmp" and "jnz" instructions together into a singular op).
None of these instructions follow the "RISC" paradigm. As soon as processors hit the real world, it turns out that CISC instructions that accelerate common tasks (like AES Encryption: done by every web server and web-browser today) or even Javascript-specific instructions, is a good thing.
---------
ARM's "CISC" roots go deeper than that. For a long time, ARM machines had a "Jazelle" mode which directly executed Java bytecode. When Java-for-phones became less popular, Jazelle support was dropped.
But in any case, the "CISC" advantage is that you get instructions designed for the applications that run on your system. And lets be frank here: AES Acceleration just makes sense these days. Everyone uses a web browser or a web server.
Honestly, x86 is falling behind the CISC-wars. Intel should try to catch up and implement a Floating-point Javascript Convert assembly instruction as well, to improve those "Geekbench" scores.
-----------
CISC vs RISC is stupid. The purported advantages of RISC have been ported to CISC, and vice versa... now as ARM and Power9 support CISC-like instructions like AESE (ARM) and vcipher (Power9). All processors will have CISC-instructions to accelerate their most common tasks these days: there's a lot of extra die space (especially because large portions of the die have to be kept 'off' to help distribute the heat. So rarely used specialized instructions are very useful for heat-distribution purposes).
The biggest advantage to "RISC-V" is the ability to add application-specific instructions to the core. That's innately a CISC-design: custom instructions to support everyone's favorite optimizations.
The original design of "RISC", that is REDUCED instruction set, is incompatible with today's cheap transistors. You can fit billions of transistors on modern systems, so there's almost no reason to reduce your instruction sets.
- TomVDB 8y agoOne CISC is not the same as the other CISC. > You might want to look up the ARM instructions "FJCVTZS" and "AESE", and "SHA256H". The AESE isntruction is a perfect example of that. The AESE instruction is a complex instruction that does not execute in the RISC pipeline, but it doesn't add major complexity to the decoder. That makes it very similar to the multiply and divide instructions on the original MIPS CPU: those operated outside of the canonical pipeline as well, with results stored in the HI and LO registers instead of the general purpose register file. Yet I don't think anyone will argue that the 1985 MIPS was not RISC. ;-)
- dragontamer 8y ago> but it doesn't add major complexity to the decoder AESE + AESMC is seen as a singular 8-byte instruction from the decoder. The two instructions are decoded as one operation to maximize the throughput of AES. Yeah, web browsers + web server workloads demand an incredibly fast AES, to the point that ARM is willing to complicate the decoder just to make this one operation faster. > Yet I don't think anyone will argue that the 1985 MIPS was not RISC. ;-) 1985 MIPS wasn't macro-op fusing together instructions for performance gains. The AESE + AESMC instruction pair is straight-up a CISC design (borrowed from Intel's cmp + jnz fusion), complicating the decoder severely but adding huge performance increases in practice. > That makes it very similar to the multiply and divide instructions on the original MIPS CPU: those operated outside of the canonical pipeline as well, with results stored in the HI and LO registers instead of the general purpose register file. AESE and AESMC operate on NEON registers. They coincide with the NEON Pipeline and NEON Registers. They're not "outside" the core by any stretch of the imagination. Maybe you're surprised that ARM has a HUGE series of 128-bit vector instructions. But yeah... ARM's instruction set is very complicated these days. Its basically a CISC processor. https://community.arm.com/android-community/b/android/posts/arm-neon-programming-quick-reference https://community.arm.com/android-community/b/android/posts/... At least, the above is true on A75: https://static.docs.arm.com/101398/0200/arm_cortex_a75_software_optimization_guide_v2.pdf https://static.docs.arm.com/101398/0200/arm_cortex_a75_softw... As you can see in the diagram, the FP0 and FP1 pipelines are all that exist in A75. The AESE / AESMC instruction pair is decoded as one instruction. Its execution is in the FP0 pipeline, just like any other NEON instruction. These are all very CISC-like design decisions. --------------- Anyway, I would argue that ARM stopped being "RISC" as soon as it implemented the "Branch to Java" Jazelle instruction: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489i/CIHBJIIB.html http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.... ARM was always a "pragmatic" architecture. It did what it had to to achieve high performance. Be it a RISC-design choice or a CISC-design choice.
- TomVDB 8y ago> AESE + AESMC is seen as a singular 8-byte instruction from the decoder. The two instructions are decoded as one operation to maximize the throughput of AES. Yeah, web browsers + web server workloads demand an incredibly fast AES, to the point that ARM is willing to complicate the decoder just to make this one operation faster. But that's an implementation decision and not inherent to the ISA itself: AESE and AESMC can be implemented as individual instructions without fusing them. The fact that RISC-V advocates fusing certain pure RISC opcode patterns for improved performance doesn't make it any more CISC either. > AESE and AESMC operate on NEON registers. They coincide with the NEON Pipeline and NEON Registers. They're not "outside" the core by any stretch of the imagination. The key part here is "NEON Pipeline and NEON Register". If you can make the split between the traditional pipeline and the additional pipelines, the complexity penalty is contained. The issue with x86 CISCness has always been with having to deal with byte-aligned variable width instructions.
- jabl 8y agoI don't think the point of RISC ever was a minimal instruction set. Heck, there have been (theoretical AFAIK) Turing-complete single-instruction computers. Is anything more than that CISC? Of course not. A more useful distinction is perhaps "death to microcode". If you have an AES instruction, that is implemented with microcode running on the "normal" ALU's; Yes, CISCy. OTOH, if your chip has hardware for doing AES, adding AES instructions for using that hw doesn't sound particularly "un-RISCy" to me. Then again, many ARM chips apparently microcode some instructions, so meh..
- dragontamer 8y agoPower9 and ARM both have register renaming and micro-ops. In fact, the SVE extension to ARM provides variable-length vectors, so that the "inner loop" of SIMD compute is stored entirely in micro-code space and independent of the ISA. ARM-SVE seems very non-RISC to me. ---------- The only thing that seems common to all RISC designs is the load/store architecture, which x86 implements under-the-hood with microops now.
- jabl 8y ago> Power9 and ARM both have register renaming and micro-ops. And? That's an implementation detail rather than a feature of the ISA. Then again, to some extent so is microcode, so I'm contradicting myself. Ugh. Well anyway, although these days there seems little common ground in what makes a design RISC, CISC, or whatnot, I think you'll be hard pressed to have much support for the idea the reg renaming or micro-ops would be such a defining feature. > In fact, the SVE extension to ARM provides variable-length vectors, so that the "inner loop" of SIMD compute is stored entirely in micro-code space and independent of the ISA. Huh? I thought the point was just that the vector width is not a compile-time constant, but rather there's some instructions like "vlmax foo", which calculates max(foo, implementation vector length), and then you use that as the loop increment rather than a compile-time constant. Not that the "inner loop" is stored in micro-code space (what does that even mean?). > ARM-SVE seems very non-RISC to me. To an extent I agree, but I'd say the most un-RISCy thing of SVE is not the variable length but rather the presence of scatter/gather instructions. I mean, in many RISC definitions there's the limit of one memory op per load/store instr., which makes sense as it makes e.g. exception handling much easier. But here with scatter/gather we have memory instructions which not only load/store multiple consecutive values, but potentially load/store a bunch of values all from different pages! If that isn't non-RISC, then what is. But then again, scatter/gather is awesome for some problems such as sparse matrix calculations. Practicality trumps ideological purity.