Expand description
A library for constructing, printing, encoding, and decoding CFD-16 assembly instructions.
This common model and functionality is used throughout the CFD-16 tooling programs such as cfd16-as, cfd16-objdump, etc…
Modules§
Structs§
- Instruction
- An instruction for the CFD-16 ISA. Please use the InstructionBuilder interface to ensure that the built Instruction is valid.
- Instruction
Builder - A builder pattern for Instructions that ensures they are always valid when instantiated.
Enums§
- Argument
- A high-level representation for an argument given to an instruction. The Argument::Imm variant may represent any of the following concrete arguments: uimm4, imm4, uimm8, imm8. An op2 or uop2 is considered to be either a register or a imm4, uimm4 respectively.
- Cond
Code - The condition code potentially associated to a given instruction. Any instruction may either contain no condition code (Type-I Encoding) contain a limited condition code (Type-C Encoding) or an extended condition code (Type-J Encoding).
- Instruction
Error - An Error type which reports unsuccessful attempts at parsing an Instruction.
- OpCode
- A mnemonic and associated binary value for encoding an Instruction. These are divided into three broad categories depending on the way they are encoded: Type C, Type I, Type J. These encoding patterns are described below. Additional documentation on the instructions associated with each opcode is provided on each variant.
- Register
- A register in the CFD-16 Instruction Set Architecture, eight of which are general-purpose (%a, %b, %c, %d, %e, %f, %g, %h), and four of which are system registers which cannot be accessed by user processes, as they are shadowed over in user mode. ( %ip, %sp, %r, %s)