34 unsigned m_num_operands;
36 std::string m_comment;
104 void set_comment(
const std::string &comment) { m_comment = comment; }
Instruction object type.
Definition: instruction.h:31
const std::string & get_comment() const
Get the textual comment for this Instruction.
Definition: instruction.h:112
const Operand & get_operand(unsigned index) const
Get the specified Operand.
Definition: instruction.cpp:54
void set_comment(const std::string &comment)
Set a textual comment for this Instruction.
Definition: instruction.h:104
Instruction(int opcode)
Contructor from opcode.
Definition: instruction.cpp:24
Operand get_last_operand() const
Return a copy of the last (rightmost) Operand.
Definition: instruction.cpp:65
void set_operand(unsigned index, const Operand &operand)
Modify the specified Operand.
Definition: instruction.cpp:60
Symbol * get_symbol() const
Return the symbol table entry (Symbol).
Definition: instruction.h:124
void set_symbol(Symbol *sym)
Set a symbol table entry (Symbol).
Definition: instruction.h:119
Instruction * duplicate() const
Return an exact duplicate of this Instruction.
Definition: instruction.h:69
unsigned get_num_operands() const
Get the number of operands.
Definition: instruction.cpp:50
int get_opcode() const
Get the opcode value.
Definition: instruction.cpp:46
bool has_comment() const
Check whether this Instruction has a comment set.
Definition: instruction.h:108