Module cretonne_codegen::binemit[][src]

Binary machine code emission.

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

Structs

MemoryCodeSink

A CodeSink that writes binary machine code directly into memory.

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 EBB.

Enums

Reloc

Relocation kinds for every ISA

Traits

CodeSink

Abstract interface for adding bytes to the code segment.

RelocSink

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

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 EBB 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.