No variable-length instructions. No arithmetic instructions that can take memory operands, shift them, and update their address at the same time.
No variable-length instructions. No arithmetic instructions that can take memory operands, shift them, and update their address at the same time.
Pretty much what you say, I just liked the way of describing it.
AESE / AESMC (AES Encode, AES Mix-columns) are an instruction pair in modern ARM chips in which the pair runs as a singular fused macro-op.
That is to say, a modern ARM chip will see "AESE / AESMC", and then fuse the two instructions and execute them simultaneously for performance reasons. Almost every "AESE" encode instruction must be followed up with AESMC (mix columns), so this leads to a significant performance increase for ARM AES instructions.
> No variable-length instructions.
So, ARM is not a RISC instruction set, because T32 (Thumb-2) instruction can be 2 or 4 bytes long.
Similarly, RISC-V has variable-length instructions for extensibility. See p. 8ff of https://github.com/riscv/riscv-isa-manual/releases/download/... (section "Expanded Instruction-Length Encoding").
With variable length instructions one must decode a previous one to figure out where the next one will start.
People said the same thing about text encodings. Then UTF-8 came along. Has anyone applied the same idea to instruction encoding?
It probably is better to keep the “how long is this instruction” logic harder and ‘waste’ logic on the decoder.
Or it could be one bit out of every pair of bytes, to support 2-, 4-, and 6-byte instructions. I don't know much about ARM Thumb-2, except that it does 2- or 4-byte instructions, so clearly someone thought this much was a good idea.
Instruction encodings are below my usual abstraction layer; I'm just speculating...
It's not all in favor of fixed width encoding though. Variable length has an advantage of fitting more things into the cache. So it's all a balancing act of ease of instruction decoding vs space used.
You don't have to make it self-synchronizing like utf-8, but a prefix length encoding is a real asset.
By comparison, 4byte instructions that are always aligned have none of those problems. Alignment is a significant simplification for the design.
(Somewhere I have a napkin plan for fully Huffman coded instructions, but then jumps are a serious problem as they're not longer byte aligned!)
spectre