spo600:instruction_encoding
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
spo600:instruction_encoding [2024/01/12 21:23] – created chris | spo600:instruction_encoding [2025/02/19 16:16] (current) – chris | ||
---|---|---|---|
Line 3: | Line 3: | ||
The encoding of instructions, | The encoding of instructions, | ||
- | Some architectures encode instructions as multi-byte sequences, where one or more bytes specify the operation to be performed and the [[Addressing Mode|addressing mode(s)]] to be used, and additional bytes specify the operands (such as the register numbers, immediate values, addresses, or offsets to be used). Other architectures encode instructions as fixed-length bitfields, where various (and varying) subfields within the bitfield specify the operation, addressing mode(s), and operands. | + | Some architectures encode instructions as multi-byte sequences, where one or more bytes specify the operation to be performed and the [[Addressing Mode|addressing mode(s)]] to be used, and additional bytes specify the operands (such as the register numbers, immediate values, addresses, or offsets to be used). |
+ | |||
+ | Other architectures encode instructions as fixed-length bitfields, where various (and varying) subfields within the bitfield specify the operation, addressing mode(s), and operands. | ||
The 6502 architecture uses variable-length byte sequences, from 1 to 3 bytes (including the [[OpCode|opcode]]) depending on the [[6502 Addressing Modes|addressing mode]]. | The 6502 architecture uses variable-length byte sequences, from 1 to 3 bytes (including the [[OpCode|opcode]]) depending on the [[6502 Addressing Modes|addressing mode]]. | ||
- | The x86_64 architecture uses variable-length byte sequences, from 1 to approximately 17 bytes. | + | The x86_64 architecture uses variable-length byte sequences, from 1 to approximately 17 bytes. In addition to opcodes and arguments, the byte sequence may contain prefix bytes that alter the operation of the instruction or provide execution hints to the processor. |
- | The AArch64 architecture uses 32-bit long instructions. Since this instruction length is insufficient to adequately contain a 64-bit operand (such as an address), some operands are encoded using run-length encoding (RLE) or shifted-bitfield techniques. For certain operand values, it may be necessary to build the required value in a register with a few instructions. | + | The AArch64 architecture uses 32-bit long instructions. Since this instruction length is insufficient to adequately contain a 64-bit operand (such as an address), some operands are encoded using run-length encoding (RLE), relative addressing, |
spo600/instruction_encoding.1705094621.txt.gz · Last modified: 2024/04/16 18:10 (external edit)