Go to the documentation of this file.
34 #ifndef TCEASM_PARSER_STRUCTS_HH
35 #define TCEASM_PARSER_STRUCTS_HH
93 retVal +=
"." +
part3;
120 std::string retVal =
part1;
122 retVal +=
"." +
part2;
177 return "Unknown register term type";
220 std::stringstream retVal;
231 retVal << std::dec <<
offset;
235 retVal <<
"=" << std::hex <<
value;
264 std::stringstream retVal;
268 retVal << std::dec << static_cast<int>(
value);
292 std::stringstream retVal;
318 std::stringstream retVal;
350 std::stringstream retVal;
351 retVal << std::dec << (int)
width <<
":";
372 std::stringstream retVal;
373 retVal <<
"[0x" << std::hex <<
id;
375 for (
unsigned int i = 0; i <
payload.size(); i++) {
376 retVal <<
" " <<
payload[i].toString();
439 std::stringstream retVal;
468 retVal <<
"Unknown move type!\n";
497 std::stringstream retVal;
499 retVal <<
"DataLine:\n"
500 <<
"address space:\t" <<
dataSpace << std::endl
501 <<
"data maus: \t" <<
width << std::endl;
503 retVal <<
"Labels:" << std::endl;
504 for (
unsigned int i = 0; i <
labels.size(); i++) {
505 retVal <<
"\t" <<
labels[i] << std::endl;
508 retVal <<
"Init data:" << std::endl;
509 for (
unsigned int i = 0; i <
initData.size(); i++) {
512 if (
initData[i].litOrExpr.isExpression) {
513 retVal <<
initData[i].litOrExpr.expression.label;
515 retVal << (int)
initData[i].litOrExpr.value;
520 if ((i+1)%16 == 0) retVal << std::endl;
std::string toString() const
std::string toString() const
bool isMinus
Is offset minus.
std::string toString() const
std::string part2
Port name.
bool part3Used
Is operation part of the term used.
bool isBegin
Tells whether the slot is the first of the instruction.
bool hasValue
Is resolved value defined in struct.
bool prev
Previous or next bus register.
bool isGuarded
Is guard used.
MoveType type
Type of move.
BusTerm busTerm
The bus term, if type field is BUS. Otherwise not used.
std::string label
Name of the label.
std::string dataSpace
Address space whose MAUs are initialized.
static std::string toString(const T &source)
RegisterTerm regTerm
Guard port or register.
const UValue MAX_VALUE_LENGTH_IN_BYTES
Buffer size.
std::string part2
Port or operation name.
UValue value
Resolved value.
std::string toString() const
UValue width
Number of MAUs that are initialized by the init field.
bool isExpression
Does object contain expression or literal.
std::string toString() const
@ LONG_IMMEDIATE
Encoding of one long immediate slot.
std::string part1
Unit name.
bool isInverted
Is guard inverted.
UValue index
Register or operand index.
bool part2Used
Is port name used.
std::string toString() const
TermType type
Type of terminal that is represented by this object.
std::string toString() const
std::string toString() const
LiteralOrExpression litOrExpr
Initialisation value.
std::vector< InitDataField > initData
Init data fields of data line. Uninitilized data line, if empty.
RegisterTerm regTerm
If register, the register. Otherwise not used.
std::string toString() const
UValue value
If literal, the literal. Otherwise not used.
std::vector< Annotation > annotationes
LiteralOrExpression immTerm
If immediate value, the literal or expression. Otherwise not used.
bool isSigned
Sign of the value.
ParserMove(MoveType aType, bool begin)
std::string toString() const
IndexTerm indexTerm
The index term, if type field is INDEX. Otherwise not used.
UValue asmLineNumber
Line number where in source code this DA line is found.
@ TRANSPORT
Data transport (move).
RegisterTerm destination
Destination field.
FUTerm fuTerm
The fu term, if type field is FUNCTION_UNIT. Otherwise not used.
MoveType
Types of instruction slots.
ParserSource source
Source field.
std::vector< std::string > labels
Labels of this data line.
UValue offset
Value of offset.
std::string toString() const
std::vector< InitDataField > payload
Expression expression
If expression the expression, Otherwise not used.
bool hasOffset
Is offset defined.
ParserGuard guard
Guard field.
std::string toString() const
std::string part1
Unit name.
std::string part3
Operation name.
UValue width
Number of MAUs initialized by this data line.
bool isRegister
Is source register or immediate reference.
UValue asmLineNumber
Line number of source code for errors.