These two enums must have identical variants. One is generated from the
instruction formats in meta/cretonne/formats.py, the other defines the contents
of an instruction.
Emit a conversion from InstructionData to InstructionFormat which also serves
to verify the correspondence. Rustc will error is the match is not complete.
This is a no-payload enum which will have the same variants as InstructionData.
This makes it possible to talk about the format of an instruction without
actually creating an InstructionData instance.
We have a two-level type system: OperandKinds and ValueTypes. The value types
only apply to value operands, but there are many more kinds of operands:
immediate numbers, condition codes, basic block references, etc.
Use a simple quadratically probed, open addressed hash table. We could use a
parfect hash function, but it would take longer to compute in Python, and this
is not in the critical path performancewise.
Generate nice doc comments for the Opcode enum variants that 'cargo doc'
will pick up.
Include a `Display` trait implementation that prints the lower
snake-case version of the opcode name.
Add new immediate types for floating point and vector immediates.
Use new immediates to define the constant value instructions in meta.
Split the fconst instruction into two: f32const and f64const. This prevents
confusion about the interpretation of 64 immediate bits when generating an f32
constant.
Add an immvector ImmediateType. This immediate type is variable length, and
provides all the bits of a SIMD vector directly.
The Cretonne meta language is used to describe Cretonne instructions, both the
target independent ones in the base instruction set and real target
instructions.
Start by providing type definitions matching langref, and begin the meta
language reference using autodoc to pull in the PYthon definitions.