OpenASIP
2.0
|
#include <Immediate.hh>
Public Member Functions | |
Immediate (TerminalImmediate *value, Terminal *dst) | |
virtual | ~Immediate () |
const Terminal & | destination () const |
TerminalImmediate & | value () const |
void | setValue (TerminalImmediate *value) |
std::shared_ptr< Immediate > | copy () const |
Instruction * | parent () const |
void | setParent (Instruction *ins) |
Private Member Functions | |
Immediate (const Immediate &) | |
Copying not allowed. More... | |
Immediate & | operator= (const Immediate &) |
Assignment not allowed. More... | |
Private Attributes | |
TerminalImmediate * | value_ |
Value of the immediate. More... | |
Terminal * | dst_ |
The destination register. More... | |
Instruction * | parent_ |
Instruction which contains this immediate. More... | |
Represents the long immediate value and its transport into a dedicated register
Definition at line 54 of file Immediate.hh.
TTAProgram::Immediate::Immediate | ( | TerminalImmediate * | value, |
Terminal * | dst | ||
) |
The constructor.
Creates a long immediate with the given value. The value specifies, implicitly, also the width of the instruction field(s) where the immediate bits are encoded). The destination register and the set of instruction slots where the immediate bits are encoded are also given as parameters.
The ownership of the destination terminal object will be passed to the immediate.
value | Value of the immediate. |
dst | Destination register. |
Definition at line 68 of file Immediate.cc.
|
virtual |
|
private |
Copying not allowed.
std::shared_ptr< Immediate > TTAProgram::Immediate::copy | ( | ) | const |
Makes a copy of the immediate.
The copy is identical, except that it is not registered to the instruction of the original immediate (and therefore, any address it refers to is not meaningful).
Definition at line 131 of file Immediate.cc.
References TTAProgram::TerminalImmediate::copy(), TTAProgram::Terminal::copy(), dst_, and value_.
Referenced by LoopPrologAndEpilogBuilder::build(), and TTAProgram::Instruction::copy().
const Terminal & TTAProgram::Immediate::destination | ( | ) | const |
Returns the destination register of this immediate.
Definition at line 92 of file Immediate.cc.
Referenced by CodeCompressorPlugin::addBitsForDstRegisterField(), ITemplateBroker::assign(), ITemplateBroker::assignImmediate(), CopyingDelaySlotFiller::checkImmediatesAfter(), POMValidator::checkLongImmediates(), CopyingDelaySlotFiller::collectMoves(), TTAProgram::ProgramWriter::createCodeSection(), POMDisassembler::createImmediateAssignment(), ControlFlowGraph::createJumps(), CompiledSimCodeGenerator::generateInstruction(), ITemplateBroker::isImmediateInTemplate(), main(), LoopPrologAndEpilogBuilder::optimizeProlog(), SimProgramBuilder::processInstruction(), CodeCompressorPlugin::programImmediate(), CopyingDelaySlotFiller::tryToAssignNodes(), and ITemplateBroker::unassignImmediate().
|
inline |
Definition at line 67 of file Immediate.hh.
References parent_.
Referenced by ITemplateBroker::assign(), ITemplateBroker::isAlreadyAssigned(), and ITemplateBroker::unassign().
|
inline |
Definition at line 68 of file Immediate.hh.
References parent_.
Referenced by TTAProgram::Instruction::removeImmediate().
void TTAProgram::Immediate::setValue | ( | TerminalImmediate * | value | ) |
Sets the value of immediate.
Value | to set for immediate. |
Definition at line 114 of file Immediate.cc.
References value(), and value_.
Referenced by ITemplateBroker::assign(), ITemplateBroker::assignImmediate(), ControlFlowGraph::convertBBRefsToInstRefs(), TTAProgram::Program::convertSymbolRefsToInsRefs(), and CopyingDelaySlotFiller::updateJumpsAndCfg().
TerminalImmediate & TTAProgram::Immediate::value | ( | ) | const |
Returns the value of this immediate.
Definition at line 103 of file Immediate.cc.
References assert, and value_.
Referenced by ITemplateBroker::assign(), ITemplateBroker::assignImmediate(), CopyingDelaySlotFiller::checkImmediatesAfter(), POMValidator::checkLongImmediates(), CopyingDelaySlotFiller::collectMoves(), ControlFlowGraph::convertBBRefsToInstRefs(), TTAProgram::Program::convertSymbolRefsToInsRefs(), TTAProgram::ProgramWriter::createCodeSection(), POMDisassembler::createImmediateAssignment(), ControlFlowGraph::createJumps(), CodeCompressorPlugin::encodeLongImmediate(), TTAProgram::Program::fixInstructionReferences(), CompiledSimCodeGenerator::generateInstruction(), ProgramImageGenerator::generateProgramImage(), getInstructionReferenceTerminals(), ITemplateBroker::isImmediateInTemplate(), main(), SimProgramBuilder::processInstruction(), setValue(), and CopyingDelaySlotFiller::updateJumpsAndCfg().
|
private |
The destination register.
Definition at line 79 of file Immediate.hh.
Referenced by copy(), destination(), and ~Immediate().
|
private |
Instruction which contains this immediate.
Definition at line 82 of file Immediate.hh.
Referenced by parent(), and setParent().
|
private |
Value of the immediate.
Definition at line 76 of file Immediate.hh.
Referenced by copy(), setValue(), value(), and ~Immediate().