Otawa
0.10
|
Class to declare simple a processor. More...
#include <otawa/proc/Registration.h>
Public Member Functions | |
declare (otawa::p::init &i) | |
virtual | ~declare (void) |
virtual Processor * | make (void) const |
Build the registered processor. More... | |
virtual bool | isFinal (void) const |
const string & | name (void) const |
Get the name of the processor. More... | |
const Version & | version (void) const |
Get the version of the processor. More... | |
AbstractRegistration & | base (void) const |
bool | provides (const AbstractFeature &feature) |
Test if the current processor provides the given feature. More... | |
bool | requires (const AbstractFeature &feature) |
Test if the current processor requires the given feature. More... | |
bool | invalidates (const AbstractFeature &feature) |
Test if the current processor invalidates the given feature. More... | |
bool | uses (const AbstractFeature &feature) |
Test if the current processor uses or requires the given feature. More... | |
void | initialize (void) |
Internal. More... | |
Protected Member Functions | |
void | init (cstring name, const Version &version, int tag, VarArg &args) |
Initialize a registration from an argument list. More... | |
void | setFeatures (const SLList< FeatureUsage > &features) |
Set the features. More... | |
void | setConfigs (const SLList< AbstractIdentifier * > &configs) |
Set the configurations. More... | |
void | record (void) |
Private Attributes | |
AbstractMaker * | _maker |
Class to declare simple a processor.
Each processor must have a static member of this type giving information about:
Below an example of processor registration using declaration:
otawa::p::declare::declare | ( | otawa::p::init & | i | ) |
|
virtual |
References _maker.
|
inlineinherited |
|
protectedinherited |
Initialize a registration from an argument list.
name | Processor name. |
version | Processor version. |
tag | First tag. |
args | List of pair (tag, value) ended by a otawa::p::end value. |
References otawa::AbstractRegistration::_base, otawa::AbstractRegistration::_name, otawa::AbstractRegistration::_version, otawa::p::base, otawa::p::config, otawa::AbstractRegistration::configs, otawa::p::end, otawa::AbstractRegistration::features, otawa::p::invalidate, otawa::FeatureUsage::invalidate, otawa::AbstractRegistration::name(), elm::VarArg::next(), otawa::p::provide, otawa::FeatureUsage::provide, otawa::AbstractRegistration::record(), otawa::p::require, otawa::FeatureUsage::require, otawa::p::use, otawa::FeatureUsage::use, and otawa::AbstractRegistration::version().
|
inherited |
Internal.
References otawa::Registry::_, otawa::AbstractRegistration::name(), otawa::Registry::procs, and elm::genstruct::HashTable< K, T, H >::put().
|
inherited |
Test if the current processor invalidates the given feature.
feature | Tested feature. |
References otawa::FeatureUsage::invalidate.
|
virtual |
Implements otawa::AbstractRegistration.
|
virtual |
Build the registered processor.
Implements otawa::AbstractRegistration.
References _maker, and otawa::AbstractMaker::make().
|
inlineinherited |
Get the name of the processor.
Referenced by otawa::AbstractRegistration::init(), otawa::AbstractRegistration::initialize(), and otawa::Processor::process().
|
inherited |
Test if the current processor provides the given feature.
feature | Tested feature. |
References otawa::FeatureUsage::provide.
|
protectedinherited |
References otawa::Registry::_, and elm::Initializer< T >::record().
Referenced by declare(), and otawa::AbstractRegistration::init().
|
inherited |
Test if the current processor requires the given feature.
feature | Tested feature. |
References otawa::FeatureUsage::require.
Referenced by otawa::AlternativeProcessor::AlternativeProcessor().
|
protectedinherited |
Set the configurations.
coll | Configures to set. |
References otawa::AbstractRegistration::configs, and otawa::p::use.
Referenced by declare().
|
protectedinherited |
Set the features.
coll | Features to set. |
References otawa::AbstractRegistration::features, and otawa::p::use.
Referenced by declare().
|
inherited |
Test if the current processor uses or requires the given feature.
feature | Tested feature. |
References otawa::FeatureUsage::require, and otawa::FeatureUsage::use.
Referenced by otawa::Processor::process().
|
inlineinherited |
Get the version of the processor.
Referenced by otawa::AbstractRegistration::init().
|
private |
Referenced by declare(), make(), and ~declare().