Rust Crate Documentation

This is the core code generator crate. It takes Cretonne IR as input and emits encoded machine instructions, along with symbolic relocations, as output.
This crate translates WebAssembly code into Cretonne IR.
This crate provides utilities for translating code into Cretonne IR.
This crate performs auto-detection of the host, allowing Cretonne to generate code optimized for the machine it’s running on.
This crate translates from Cretonne IR’s text format into Cretonne IR in in-memory data structures.
This crate manages compiling multiple functions and data objects together.
This crate provides a faerie-based backend for cretonne-module, which emits native object files using the faerie library.
This crate provides a simple JIT backend for cretonne-module, which emits code and data into memory.

Indices and tables

Todo list


Add and subtract with signed overflow.

For example, see llvm.sadd.with.overflow.* and llvm.ssub.with.overflow.* in LLVM.

(The original entry is located in /home/docs/checkouts/, line 828.)


Larger multiplication results.

For example, smulx which multiplies i32 operands to produce a i64 result. Alternatively, smulhi and smullo pairs.

(The original entry is located in /home/docs/checkouts/, line 837.)


Integer minimum / maximum.

NEON has smin, smax, umin, and umax instructions. We should replicate those for both scalar and vector integer types. Even if the target ISA doesn’t have scalar operations, these are good pattern matching targets.

(The original entry is located in /home/docs/checkouts/, line 851.)


Saturating arithmetic.

Mostly for SIMD use, but again these are good patterns for contraction. Something like usatadd, usatsub, ssatadd, and ssatsub is a good start.

(The original entry is located in /home/docs/checkouts/, line 858.)


Saturating fcvt_to_sint and fcvt_to_uint.

For example, these appear in Rust and WebAssembly.

(The original entry is located in /home/docs/checkouts/, line 981.)