[][src]Module cranelift_codegen::binemit

Binary machine code emission.

The binemit module contains code for translating Cranelift's intermediate representation into binary machine code.

Structs

CodeInfo

Container for information about a vector of compiled code and its supporting read-only data.

MemoryCodeSink

A CodeSink that writes binary machine code directly into memory.

NullRelocSink

A RelocSink implementation that does nothing, which is convenient when compiling code that does not relocate anything.

NullStackmapSink

Placeholder StackmapSink that does nothing.

NullTrapSink

A TrapSink implementation that does nothing, which is convenient when compiling code that does not rely on trapping semantics.

RegDiversions

Keep track of diversions in an block.

Stackmap

A stack map is a bitmap with one bit per machine word on the stack. Stack maps are created at safepoint instructions and record all live reference values that are on the stack. All slot kinds, except OutgoingArg are captured in a stack map. The OutgoingArg's will be captured in the callee function as IncomingArg's.

Enums

FrameUnwindKind

Type of the frame unwind information.

Reloc

Relocation kinds for every ISA

Traits

CodeSink

Abstract interface for adding bytes to the code segment.

FrameUnwindSink

Sink for frame unwind information.

RelocSink

A trait for receiving relocations for code that is emitted directly into memory.

StackmapSink

A trait for emitting stackmaps.

TrapSink

A trait for receiving trap codes and offsets.

Functions

bad_encoding

Report a bad encoding error.

emit_function

Emit a function to sink, given an instruction emitter function.

relax_branches

Relax branches and compute the final layout of block headers in func.

shrink_instructions

Pick the smallest valid encodings for instructions.

Type Definitions

Addend

Addend to add to the symbol value.

CodeOffset

Offset in bytes from the beginning of the function.

FrameUnwindOffset

Offset in frame unwind information buffer.