required entries:
-
set
typestring
, the name of the Instruction Set, currently unused -
width
typeinteger
, the width of an instruction defined by the set, in bits, used by the decoder to filter which set to search for a valid instruction in -
formats
typemap
names
typelist
, list of all different output format names that are contained in the file, given asstring
parts
typelist
, list of all parts that may appear in a type. Each part is alist
itself, with the entries, the last marked as optional: name, bitwidth, type[, format]- name is a
string
- bitwidth is an
integer
- type is a
string
and can be"boolean", "char", "i8", "i16", "i32", "i64", "u8", "u16", "u32", "u64", "isize", "usize", "f32", "f64"
or the slightly special type"VInt"
, which is an unsigned or signed number of 128 bit size, depending on an argument in the instructions section later on All other type names are also accepted (as long as they do not contain the reserved character.
), but are treated as custom Mappings that must be defined in the toml itself - the optional value of format is of type
string
and can be any of the following:"", "decimal", "dec", "d", "10"
for decoding as a base 10 number,"hexadecimal", "hex", "h", "x", "0x", "16"
for decoding as a base 16 number,"Octal", "oct", "o", "0o", "8"
for decoding as a base 8 number and"Binary", "bin", "b", "0b", "2"
for decoding as a base 2 number. Since""
is included in base 10, leaving out the format value implies base 10
- name is a
-
types
typemap
names
typelist
, list of all different type names that are contained in the file, given asstring
<name>
of typelist
, one exists for each type named intype.names
with<name>
being replaced with the value from the list The parts are also listed in the exact order they appear in the instruction type that is to be decoded, from MSB to LSB Each entry in the list is of typemap
with the following values:name
name of the part (typestring
), corresponding to the name from thetypes.parts
listtop
top bit index of the part (typeinteger
) that is being mapped onto the instructionbot
bottom bit index of the part (typeinteger
) that is being mapped onto the instruction- [
extend_top
] optional, typeinteger
, value for how many extra bits the top bit should be extended for, absence implies 0
-
mappings
typemap
names
typelist
, a list of strings which define all custom mappings in the file<name>
of typelist
ormap
(where all keys need to be numbers, either in decimal format or in number prefix form, eg 0x10) If the type islist
, then the index of the element is used for the mapping, and if an index that would be out of range were to appear, it would cause an error If the type ismap
, then the key would be used for mapping, and if the key does not exist, it will not cause an error, but instead just print out the unmapped value
-
<format-name>
typemap
, one for every entry in the format names listtype
typestring
, corresponds to the type used to parse the instruction, which will directly impact what parts are available to use for the formatinstructions
typemap
<name-of-instruction>
typemap
, one for every instruction hat should be represented by the formatmask
the value that is applied to an incoming instruction via an AND operationmatch
the value that the incoming instruction & mask should be, if the incoming instruction should be decoded as this one- [
unsigned
] typeboolean
, True if allVInt
parts in the type should be decoded as unsigned. If the entry is missing, it implies False, and thus allVInt
will be signed
repr
typemap
default
for representing the default formatting- the format string works in the way, that it replaces certain parts of the string, i.e.
%<name_of_part>%
with the corresponding decoded value of the part in the type, as well as$name$
with the name of the instruction, with all occurrences of_
replaced with.
in the name
- the format string works in the way, that it replaces certain parts of the string, i.e.
<name-of-instruction>
for overriding the formatting for single instructions