OpenASIP
2.0
|
#include <LongImmediateRegisterState.hh>
Public Member Functions | |
LongImmediateRegisterState (LongImmediateUnitState *parent, int index, int width, bool signExtend) | |
virtual | ~LongImmediateRegisterState () |
virtual void | setValue (const SimValue &value) |
virtual const SimValue & | value () const |
Public Member Functions inherited from StateData | |
StateData () | |
virtual | ~StateData () |
Public Member Functions inherited from WritableState | |
WritableState () | |
virtual | ~WritableState () |
Public Member Functions inherited from ReadableState | |
ReadableState () | |
virtual | ~ReadableState () |
Private Member Functions | |
LongImmediateRegisterState (const LongImmediateRegisterState &) | |
Copying not allowed. More... | |
LongImmediateRegisterState & | operator= (const LongImmediateRegisterState &) |
Assignment not allowed. More... | |
Private Attributes | |
LongImmediateUnitState * | parent_ |
Parent unit of the register state. More... | |
int | index_ |
Index of the register. More... | |
int | width_ |
The bit width of the register (needed only while extending). More... | |
bool | signExtend_ |
True in case the written values should be sign extended. More... | |
Represents a register of a long immediate unit.
Definition at line 47 of file LongImmediateRegisterState.hh.
LongImmediateRegisterState::LongImmediateRegisterState | ( | LongImmediateUnitState * | parent, |
int | index, | ||
int | width, | ||
bool | signExtend | ||
) |
Constructor.
parent | Parent unit of the register. |
index | Index of the register. |
width | The bit width of the register. |
signExtend | True in case written value should be sign extended (default is zero extension). |
Definition at line 49 of file LongImmediateRegisterState.cc.
|
virtual |
|
private |
Copying not allowed.
|
private |
Assignment not allowed.
|
virtual |
Sets the value of the register.
Also extends the value if it's narrower than the register width.
value | New value. |
Implements WritableState.
Definition at line 69 of file LongImmediateRegisterState.cc.
References index_, parent_, LongImmediateUnitState::setRegisterValue(), signExtend_, SimValue::sLongWordValue(), SimValue::uLongWordValue(), value(), SimValue::width(), and width_.
Referenced by LongImmUpdateAction::execute().
|
virtual |
Returns the register value.
Implements ReadableState.
Definition at line 99 of file LongImmediateRegisterState.cc.
References index_, parent_, and LongImmediateUnitState::registerValue().
Referenced by ProximRegisterWindow::loadImmediateUnit(), and setValue().
|
private |
Index of the register.
Definition at line 68 of file LongImmediateRegisterState.hh.
Referenced by setValue(), and value().
|
private |
Parent unit of the register state.
Definition at line 66 of file LongImmediateRegisterState.hh.
Referenced by setValue(), and value().
|
private |
True in case the written values should be sign extended.
Definition at line 72 of file LongImmediateRegisterState.hh.
Referenced by setValue().
|
private |
The bit width of the register (needed only while extending).
Definition at line 70 of file LongImmediateRegisterState.hh.
Referenced by setValue().