[][src]Constant cranelift_codegen_meta::gen_encodings::CODE_BITS

const CODE_BITS: usize = 16;

The u16 values in an encoding list entry are interpreted as follows:

NR = len(all_recipes)

entry < 2*NR Try Encoding(entry/2, next_entry) if the recipe predicate is satisfied. If bit 0 is set, stop with the default legalization code. If bit 0 is clear, keep going down the list. entry < PRED_START Stop with legalization code entry - 2*NR.

Remaining entries are interpreted as (skip, pred) pairs, where:

skip = (entry - PRED_START) >> PRED_BITS pred = (entry - PRED_START) & PRED_MASK

If the predicate is satisfied, keep going. Otherwise skip over the next skip entries. If skip == 0, stop with the default legalization code.

The pred predicate number is interpreted as an instruction predicate if it is in range, otherwise an ISA predicate. Encoding lists are represented as u16 arrays.