Module dsl

Source
Expand description

Defines a domain-specific language (DSL) for describing x64 instructions.

This language is intended to be:

  • compact–i.e., define an x64 instruction on a single line, and
  • a close-to-direct mapping of what we read in the x64 reference manual.

Re-exports§

pub use format::align;
pub use format::fmt;
pub use format::r;
pub use format::rw;
pub use format::sxl;
pub use format::sxq;
pub use format::sxw;
pub use format::Extension;
pub use format::Format;
pub use format::Location;
pub use format::Mutability;
pub use format::Operand;
pub use format::OperandKind;

Modules§

format
A DSL for describing x64 instruction formats–the shape of the operands.

Structs§

Features
A collection of CPU features.
Inst
An x64 instruction.
Opcodes
Describe an instruction’s opcodes. From section 2.1.2 “Opcodes” in the reference manual:
Prefixes
The allowed prefixes for an instruction. From the reference manual (section 2.1.1):
Rex
The traditional x64 encoding.

Enums§

Encoding
Enumerate the ways x64 encodes instructions.
Feature
A CPU feature.
Group1Prefix
Group2Prefix
Contains the segment override prefixes or a (deprecated) branch hint when used on a Jcc instruction. Note that using the segment override prefixes on a branch instruction is reserved. See section 2.1.1, “Instruction Prefixes,” in the reference manual.
Group3Prefix
Contains the operand-size override prefix (0x66); also used as a SIMD prefix. From the reference manual:
Group4Prefix
Contains the address-size override prefix (0x67). From the reference manual:

Constants§

ALL_FEATURES
List all CPU features.

Functions§

inst
Abbreviated constructor for an x64 instruction.
rex
An abbreviated constructor for REX-encoded instructions.
vex
An abbreviated constructor for VEX-encoded instructions.