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;
const UValue MAX_VALUE_LENGTH_IN_BYTES
Buffer size.
std::string toString() const
std::vector< InitDataField > payload
bool prev
Previous or next bus register.
std::string toString() const
static std::string toString(const T &source)
std::string toString() const
UValue width
Number of MAUs initialized by this data line.
std::vector< InitDataField > initData
Init data fields of data line. Uninitilized data line, if empty.
std::vector< std::string > labels
Labels of this data line.
std::string dataSpace
Address space whose MAUs are initialized.
UValue asmLineNumber
Line number where in source code this DA line is found.
bool hasOffset
Is offset defined.
std::string toString() const
bool isMinus
Is offset minus.
UValue value
Resolved value.
bool hasValue
Is resolved value defined in struct.
std::string label
Name of the label.
UValue offset
Value of offset.
std::string toString() const
std::string part3
Operation name.
std::string part2
Port name.
std::string part1
Unit name.
bool part3Used
Is operation part of the term used.
std::string part1
Unit name.
std::string part2
Port or operation name.
bool part2Used
Is port name used.
std::string toString() const
UValue index
Register or operand index.
std::string toString() const
LiteralOrExpression litOrExpr
Initialisation value.
UValue width
Number of MAUs that are initialized by the init field.
std::string toString() const
bool isExpression
Does object contain expression or literal.
UValue value
If literal, the literal. Otherwise not used.
bool isSigned
Sign of the value.
Expression expression
If expression the expression, Otherwise not used.
RegisterTerm regTerm
Guard port or register.
bool isInverted
Is guard inverted.
bool isGuarded
Is guard used.
std::string toString() const
MoveType
Types of instruction slots.
@ TRANSPORT
Data transport (move).
@ LONG_IMMEDIATE
Encoding of one long immediate slot.
std::vector< Annotation > annotationes
MoveType type
Type of move.
ParserSource source
Source field.
ParserMove(MoveType aType, bool begin)
std::string toString() const
bool isBegin
Tells whether the slot is the first of the instruction.
UValue asmLineNumber
Line number of source code for errors.
ParserGuard guard
Guard field.
RegisterTerm destination
Destination field.
bool isRegister
Is source register or immediate reference.
std::string toString() const
LiteralOrExpression immTerm
If immediate value, the literal or expression. Otherwise not used.
RegisterTerm regTerm
If register, the register. Otherwise not used.
FUTerm fuTerm
The fu term, if type field is FUNCTION_UNIT. Otherwise not used.
IndexTerm indexTerm
The index term, if type field is INDEX. Otherwise not used.
TermType type
Type of terminal that is represented by this object.
std::string toString() const
BusTerm busTerm
The bus term, if type field is BUS. Otherwise not used.