<<< The Goal to Keep Opcodes Small | Index | Variable-length Opcodes, Cont. >>> |
We can make some opcodes longer than n bits...
...and that is the secret to reducing the size of a typical program on the CPU!
(This strategy is acceptable only for CISC processors; RISC(*) processors prefer uniform 32-bit or 64-bit instructions.)
Assuming that CPU is capable of reading byte-sized quantities from memory, each opcode must be some even multiple of 8-bits long.
Another point to consider is the space for instruction operands:
RISC designers include all operands in their opcode.
CISC designers, including x86, place constants and address displacements (offsets) apart from the opcode.
______________
(*) CISC stands for
while RISC is a
<<< The Goal to Keep Opcodes Small | Index | Variable-length Opcodes, Cont. >>> |