Legend:
Library
Module
Module type
Parameter
Class
Class type
Description of the execution target.
An abstract description of the system on which a program is intended to be run. The description precisely describes various architectual and microarchitectual details of the target system, and could be extended with further details either internally, by adding more fields (and functions to this module) or storing those options in Options.t; or externally, by maintaining finite mappings from Target.t to corresponding properties.
The Target.t has a lightweight immediate representation, which is portable across OCaml runtime and persistent across versions of BAP and OCaml.
ascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~compare:ascending and List.sort
~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.
This function only needs implementation if t exposed to be a polymorphic variant. Despite what the type reads, this does *not* produce a function after reading; instead it takes the constructor tag (int) before reading and reads the rest of the variant t afterwards.
declare ?package name declares a new execution target.
The packaged name of the target must be unique and the target shall be declared during the module registration (commonly as a toplevel definition of a module that implements the target support package).
The newly declared target inherits all the parameters from the parent target unless they are explicitly overriden.
For the description of parameters see the corresponding accessor functions in this module.
matches target name is true if name matches either the unqualified name of the target itsef or one of its ancestors; or if the name matches one of the target nicknames. E.g., matches target "mips".
partition targets partitions targets into families.
The partition is a list where each element is a list of family members with the family parent coming as the first member and all other members ordered in the ascending order of their hierarchy, i.e., for each p::fs in families ()family p is p:fs. The families itself are partitioned by the lexical order of the unqualified names of the family parents.
vars target is the set of all registers and memories.
The set includes both general-purpose, floating-points, and status registers, as well variables that denote memories and other entities specific to the target.