<<< Encoding The Opcodes | Index | The Goal to Keep Opcodes Small >>> |
For example, on the x86 CPUs the opcodes for
mov eax, ebx ; copy data from EBX register to EAX register
and
mov ecx, edx ; copy data from EDX register to ECX register
are different, but both instructions are related: they both move data from one register to another.
The only difference between the two MOVs is the source and destination operands.
This suggests that we could encode instructions like MOV with a sub-opcode and encode the operands using other bits within the opcode.
<<< Encoding The Opcodes | Index | The Goal to Keep Opcodes Small >>> |