|
OpenASIP 2.2
|
#include <NOPEncoding.hh>


Public Member Functions | |
| NOPEncoding (unsigned int encoding, unsigned int extraBits, SlotField &parent) | |
| NOPEncoding (const ObjectState *state, SlotField &parent) | |
| virtual | ~NOPEncoding () |
| SlotField * | parent () const |
| virtual int | bitPosition () const |
| virtual ObjectState * | saveState () const |
Public Member Functions inherited from Encoding | |
| virtual | ~Encoding () |
| InstructionField * | parent () const |
| unsigned int | encoding () const |
| unsigned int | extraBits () const |
| virtual int | width () const |
Static Public Attributes | |
| static const std::string | OSNAME_NOP_ENCODING = "nop_encoding" |
| ObjectState name for NOP encoding. | |
Static Public Attributes inherited from Encoding | |
| static const std::string | OSNAME_ENCODING = "encoding" |
| ObjectState name for Encoding class. | |
| static const std::string | OSKEY_ENCODING = "encoding" |
| ObjectState attribute key for the encoding. | |
| static const std::string | OSKEY_EXTRA_BITS = "extra_bits" |
| ObjectState attribute key for the number of extra bits. | |
Additional Inherited Members | |
Protected Member Functions inherited from Encoding | |
| Encoding (unsigned int encoding, unsigned int extraBits, InstructionField *parent) | |
| Encoding (const ObjectState *state, InstructionField *parent) | |
| void | setParent (InstructionField *parent) |
| void | setEncoding (unsigned int encoding, unsigned int extraBits) |
Represents the encoding for NOP (no operation) in the source field.
Definition at line 44 of file NOPEncoding.hh.
| NOPEncoding::NOPEncoding | ( | unsigned int | encoding, |
| unsigned int | extraBits, | ||
| SlotField & | parent | ||
| ) |
The constructor.
Registers the encoding automatically to the parent src/dst field.
| encoding | The encoding for inline immediates. |
| extraBits | The number of extra bits in the encoding. |
| parent | The parent src/dst field. |
| ObjectAlreadyExists | If the given parent field has a NOP encoding already or if the encoding is ambiguous with some other encoding in the parent field. |
Definition at line 55 of file NOPEncoding.cc.
References parent(), SlotField::setNoOperationEncoding(), and Encoding::setParent().

| NOPEncoding::NOPEncoding | ( | const ObjectState * | state, |
| SlotField & | parent | ||
| ) |
The constructor.
Loads the state of the object from the given ObjectState instance.
| state | The ObjectState instance. |
| parent | The parent field. |
| ObjectAlreadyExists | If the given parent field has a NOP encoding already or if the encoding is ambiguous with some other encoding in the parent field. |
| ObjectStateLoadingException | If the given ObjectState instance is erroneous. |
Definition at line 76 of file NOPEncoding.cc.
References ObjectState::name(), OSNAME_NOP_ENCODING, parent(), SlotField::setNoOperationEncoding(), and Encoding::setParent().

|
virtual |
The destructor.
Definition at line 91 of file NOPEncoding.cc.
References assert, parent(), Encoding::setParent(), and SlotField::unsetNoOperationEncoding().

|
virtual |
Returns the position of the encoding within the source field.
Implements Encoding.
Definition at line 123 of file NOPEncoding.cc.
References InstructionField::extraBits(), BinaryEncoding::LEFT, parent(), Encoding::width(), and SlotField::width().

| SlotField * NOPEncoding::parent | ( | ) | const |
Returns the parent source field.
Definition at line 105 of file NOPEncoding.cc.
References assert, Encoding::parent(), and parent().
Referenced by bitPosition(), NOPEncoding(), NOPEncoding(), parent(), SlotField::setNoOperationEncoding(), and ~NOPEncoding().

|
virtual |
Saves the state of the object to an ObjectState instance.
Reimplemented from Encoding.
Definition at line 138 of file NOPEncoding.cc.
References OSNAME_NOP_ENCODING, Encoding::saveState(), and ObjectState::setName().

|
static |
ObjectState name for NOP encoding.
Definition at line 57 of file NOPEncoding.hh.
Referenced by SlotField::loadState(), NOPEncoding(), saveState(), BEMSerializer::slotFieldToFile(), and BEMSerializer::slotFieldToOM().