OpenASIP
2.0
|
#include <IndexBound.hh>
Public Member Functions | |
IndexBound (unsigned int startIndex, unsigned int endIndex) | |
IndexBound (unsigned int startIndex, unsigned int endIndex, int limmWidth, int limmLeftIndex, int limmRightIndex) | |
~IndexBound () | |
unsigned int | slotStartIndex () const |
unsigned int | slotEndIndex () const |
void | incrStartIndex (unsigned int increment) |
void | incrEndIndex (unsigned int increment) |
bool | isLimmEncoded () const |
int | limmWidth () const |
int | limmLeftIndex () const |
int | limmRightIndex () const |
Private Member Functions | |
IndexBound () | |
Private Attributes | |
unsigned int | slotStartIndex_ |
Start index of the moveslot in instruction. More... | |
unsigned int | slotEndIndex_ |
End index of the moveslot in instruction. More... | |
bool | usesLimm_ |
Is address encoded in long immediate. More... | |
int | limmWidth_ |
Width of the long immediate chunk in this moveslot. More... | |
int | limmValueLeftBitIndex_ |
Index of the left most bit (MSB) of the value to be encoded in this slot. More... | |
int | limmValueRightBitIndex_ |
Index of the right most bit (LSB) of the value to be encoded in this slot. More... | |
Class for storing index information needed for fixing instruction addresses in InstructionBitVector
Definition at line 40 of file IndexBound.hh.
IndexBound::IndexBound | ( | unsigned int | startIndex, |
unsigned int | endIndex | ||
) |
IndexBound::IndexBound | ( | unsigned int | startIndex, |
unsigned int | endIndex, | ||
int | limmWidth, | ||
int | limmLeftIndex, | ||
int | limmRightIndex | ||
) |
Constructor for moveslot bounds and limm slot bound indices
Definition at line 46 of file IndexBound.cc.
IndexBound::~IndexBound | ( | ) |
|
private |
void IndexBound::incrEndIndex | ( | unsigned int | increment | ) |
Increment end bit index.
Useful for converting the move slot index to absolute position inside the instruction bit stream
increment | Value to be added to the end index |
Definition at line 109 of file IndexBound.cc.
References slotEndIndex_.
void IndexBound::incrStartIndex | ( | unsigned int | increment | ) |
Increment start bit index.
Useful for converting the move slot index to absolute position inside the instruction bit stream.
increment | Value to be added to the start index |
Definition at line 95 of file IndexBound.cc.
References slotStartIndex_.
bool IndexBound::isLimmEncoded | ( | ) | const |
Is long immediate encoding utilized in this move slot
Definition at line 120 of file IndexBound.cc.
References usesLimm_.
int IndexBound::limmLeftIndex | ( | ) | const |
Query the leftmost (MSB) index of the long immediate value in this slot
This tells the leftmost bit of the long immediate value this slot is going to encode, not the position of the limm slot inside the instruction. Notice that the indexing starts from zero.
Definition at line 146 of file IndexBound.cc.
References limmValueLeftBitIndex_.
Referenced by InstructionBitVector::fixBits().
int IndexBound::limmRightIndex | ( | ) | const |
Query the rightmost (LSB) index of the long immediate value in this slot
This tells the rightmost bit of the long immediate value this slot is going to encode, not the position of the limm slot inside the instruction. Notice that the indexing starts from zero.
Definition at line 161 of file IndexBound.cc.
References limmValueRightBitIndex_.
Referenced by InstructionBitVector::fixBits().
int IndexBound::limmWidth | ( | ) | const |
Query the width of the limm slot
Definition at line 131 of file IndexBound.cc.
References limmWidth_.
Referenced by InstructionBitVector::fixBits().
unsigned int IndexBound::slotEndIndex | ( | ) | const |
Move slot end index
Definition at line 81 of file IndexBound.cc.
References slotEndIndex_.
Referenced by InstructionBitVector::addIndexBoundsForReference(), and InstructionBitVector::fixBits().
unsigned int IndexBound::slotStartIndex | ( | ) | const |
Move slot start index
Definition at line 70 of file IndexBound.cc.
References slotStartIndex_.
Referenced by InstructionBitVector::addIndexBoundsForReference(), and InstructionBitVector::fixBits().
|
private |
Index of the left most bit (MSB) of the value to be encoded in this slot.
Definition at line 83 of file IndexBound.hh.
Referenced by limmLeftIndex().
|
private |
Index of the right most bit (LSB) of the value to be encoded in this slot.
Definition at line 86 of file IndexBound.hh.
Referenced by limmRightIndex().
|
private |
Width of the long immediate chunk in this moveslot.
Definition at line 80 of file IndexBound.hh.
Referenced by limmWidth().
|
private |
End index of the moveslot in instruction.
Definition at line 76 of file IndexBound.hh.
Referenced by incrEndIndex(), and slotEndIndex().
|
private |
Start index of the moveslot in instruction.
Definition at line 74 of file IndexBound.hh.
Referenced by incrStartIndex(), and slotStartIndex().
|
private |
Is address encoded in long immediate.
Definition at line 78 of file IndexBound.hh.
Referenced by isLimmEncoded().