Expand description
A DSL for describing x64 instruction formats–the shape of the operands.
Every instruction has a format that corresponds to its encoding’s expected operands. The format is what allows us to generate code that accepts operands of the right type and check that the operands are used in the right way.
The entry point for this module is fmt
.
let f = fmt("rm", [rw(r32), r(rm32)]);
assert_eq!(f.to_string(), "rm(r32[rw], rm32)")
Structs§
Enums§
- Extension
- x64 operands may be sign- or zero-extended.
- Location
- An operand location, as expressed in Intel’s Instruction Set Reference.
- Mutability
- x64 operands can be mutable or not.
- Operand
Kind - Organize the operand locations by kind.
- RegClass
- The kind of register used in a
Location
.
Functions§
- align
- An abbreviated constructor for a memory operand that requires alignment.
- fmt
- An abbreviated constructor for an instruction “format.”
- r
- An abbreviated constructor for a “read” operand.
- rw
- An abbreviated constructor for a “read-write” operand.
- sxl
- An abbreviated constructor for a “read” operand that is sign-extended to 32 bits (longword).
- sxq
- An abbreviated constructor for a “read” operand that is sign-extended to 64 bits (quadword).
- sxw
- An abbreviated constructor for a “read” operand that is sign-extended to 16 bits (word).
- w
- An abbreviated constructor for a “write” operand.