Crate dynasmrt [] [src]

Macros

MutPointer

Preforms the same action as the Pointer! macro, but casts to a *mut pointer.

Pointer

This macro takes a *const pointer from the source operand, and then casts it to the desired return type. this allows it to be used as an easy shorthand for passing pointers as dynasm immediate arguments.

Structs

Assembler

This struct is an implementation of a dynasm runtime. It supports incremental compilation as well as multithreaded execution with simultaneous compilation. Its implementation ensures that no memory is writeable and executable at the same time.

AssemblyModifier

This struct is a wrapper around an Assembler normally created using the Assembler.alter method. Instead of writing to a temporary assembling buffer, this struct assembles directly into an executable buffer. The goto method can be used to set the assembling offset in the ExecutableBuffer of the assembler (this offset is initialized to 0) after which the data at this location can be overwritten by assembling into this struct.

AssemblyOffset

A struct representing an offset into the assembling buffer of a DynasmLabelApi struct. The wrapped usize is the offset from the start of the assembling buffer in bytes.

DynamicLabel

A dynamic label

ExecutableBuffer

A structure holding a buffer of executable memory

Executor

A read-only shared reference to the executable buffer inside an Assembler. By locking it the internal ExecutableBuffer can be accessed and executed.

UncommittedModifier

This struct is a wrapper around an Assembler normally created using the Assembler.alter_uncommitted method. It allows the user to edit parts of the assembling buffer that cannot be determined easily or efficiently in advance. Due to limitations of the label resolution algorithms, this assembler does not allow labels to be used.

Traits

DynasmApi

This trait represents the interface that must be implemented to allow the dynasm preprocessor to assemble into a datastructure.

DynasmLabelApi

This trait extends DynasmApi to not only allow assembling, but also labels and various directives