OpenASIP
2.0
|
#include <DataDefinition.hh>
Public Member Functions | |
DataDefinition (Address start, int size, bool littleEndian, MinimumAddressableUnit *initData=NULL, bool allZeros=false) | |
DataDefinition (Address start, const std::vector< MinimumAddressableUnit > &initData, bool littleEndian) | |
virtual | ~DataDefinition () |
virtual Address | startAddress () const |
virtual void | setStartAddress (Address start) |
virtual bool | isInitialized () const |
virtual MinimumAddressableUnit | MAU (int index) const |
virtual int | size () const |
virtual bool | isAddress () const |
virtual bool | isInstructionAddress () const |
virtual Address | destinationAddress () const |
virtual void | setDestinationAddress (Address dest) |
virtual DataDefinition * | copy () const |
bool | isLittleEndian () const |
Private Attributes | |
Address | start_ |
Start address of definition. More... | |
int | size_ |
Size of uninitialized data definition. More... | |
std::vector< MinimumAddressableUnit > * | data_ |
Init data of definition. More... | |
bool | allZeros_ |
Is all the data zeros? (In this case data_ is null) More... | |
bool | littleEndian_ |
Describes characteristics of an initialized or uninitialized memory area.
Definition at line 52 of file DataDefinition.hh.
TTAProgram::DataDefinition::DataDefinition | ( | Address | start, |
int | size, | ||
bool | littleEndian, | ||
MinimumAddressableUnit * | initData = NULL , |
||
bool | allZeros = false |
||
) |
Creates data area definition.
start | Starting address of definition. |
size | Number of MAUs that area represents. |
initData | Table of initialization data if initialized definition. |
OutOfRange | In case the initialization data contains data that do not fit in a MAU. |
Definition at line 52 of file DataDefinition.cc.
References __func__, data_, MathTools::requiredBits(), MathTools::requiredBitsSigned(), size(), TTAProgram::Address::space(), and TTAMachine::AddressSpace::width().
Referenced by copy().
TTAProgram::DataDefinition::DataDefinition | ( | Address | start, |
const std::vector< MinimumAddressableUnit > & | initData, | ||
bool | littleEndian | ||
) |
Creates initialized data area definition.
start | Starting address of definition. |
initData | Initialization data. |
OutOfRange | In case the initialization data contains data that do not fit in a MAU. |
Definition at line 89 of file DataDefinition.cc.
References __func__, data_, MathTools::requiredBits(), MathTools::requiredBitsSigned(), size_, TTAProgram::Address::space(), and TTAMachine::AddressSpace::width().
|
virtual |
|
virtual |
POM style copy constructor, which supports dynamic binding.
Reimplemented in TTAProgram::DataInstructionAddressDef, and TTAProgram::DataAddressDef.
Definition at line 262 of file DataDefinition.cc.
References allZeros_, data_, DataDefinition(), isInitialized(), littleEndian_, size_, and start_.
Referenced by TTAProgram::DataMemory::copy(), and TTAProgram::Program::copyDataMemoriesFrom().
|
virtual |
Returns address where to initialization data refers.
Reimplemented in TTAProgram::DataInstructionAddressDef, and TTAProgram::DataAddressDef.
Definition at line 241 of file DataDefinition.cc.
References __func__.
Referenced by ControlFlowGraph::computeLeadersFromRelocations(), TTAProgram::Program::copyDataMemoriesFrom(), TTAProgram::ProgramWriter::createDataSections(), llvm::LLVMTCEBuilder::deleteDeadProcedures(), MAU(), and TTAProgram::Program::replaceUniversalAddressSpaces().
|
virtual |
Returns true if init data of definition contains an address.
Reimplemented in TTAProgram::DataInstructionAddressDef, and TTAProgram::DataAddressDef.
Definition at line 221 of file DataDefinition.cc.
Referenced by TTAProgram::ProgramWriter::createDataSections(), MAU(), and TTAProgram::Program::replaceUniversalAddressSpaces().
|
virtual |
Returns true if data definition contains initialization data.
Reimplemented in TTAProgram::DataInstructionAddressDef, and TTAProgram::DataAddressDef.
Definition at line 144 of file DataDefinition.cc.
References allZeros_, and data_.
Referenced by copy(), TTAProgram::ProgramWriter::createDataSections(), POMDisassembler::dataDefDescription(), SimulatorFrontend::initializeDataMemories(), main(), and MAU().
|
virtual |
Returns true if init data of definition contains an instruction address.
Reimplemented in TTAProgram::DataInstructionAddressDef.
Definition at line 231 of file DataDefinition.cc.
Referenced by ControlFlowGraph::computeLeadersFromRelocations(), TTAProgram::Program::copyDataMemoriesFrom(), and TTAProgram::Program::replaceUniversalAddressSpaces().
|
inline |
Definition at line 78 of file DataDefinition.hh.
References littleEndian_.
Referenced by TTAProgram::DataAddressDef::copy().
|
virtual |
Returns one MAU of initialization values from requested index.
index | Index of the MAU whic is returned. |
Definition at line 155 of file DataDefinition.cc.
References __func__, allZeros_, assert, BYTE_BITWIDTH, data_, destinationAddress(), isAddress(), isInitialized(), littleEndian_, TTAProgram::Address::location(), size(), TTAProgram::Address::space(), startAddress(), and TTAMachine::AddressSpace::width().
Referenced by TTAProgram::ProgramWriter::createDataSections(), POMDisassembler::dataDefDescription(), SimulatorFrontend::initializeDataMemories(), and main().
|
virtual |
Set new destination address for the data definition.
Reimplemented in TTAProgram::DataAddressDef.
Definition at line 251 of file DataDefinition.cc.
References __func__.
Referenced by TTAProgram::Program::replaceUniversalAddressSpaces().
|
virtual |
Definition at line 134 of file DataDefinition.cc.
References start_.
Referenced by TTAProgram::DataMemory::setAddressSpace().
|
virtual |
Returns the number of MAUs represented by definition.
Definition at line 211 of file DataDefinition.cc.
References size_.
Referenced by StaticProgramAnalyzer::addProgram(), TTAProgram::DataAddressDef::copy(), TTAProgram::Program::copyDataMemoriesFrom(), TTAProgram::TPEFProgramFactory::createDataMemories(), TTAProgram::ProgramWriter::createDataSections(), llvm::LLVMTCEBuilder::createFPDataDefinition(), llvm::LLVMTCEBuilder::createGlobalValueDataDefinition(), llvm::LLVMTCEBuilder::createIntDataDefinition(), POMDisassembler::dataDefDescription(), DataDefinition(), TTAProgram::DataMemory::dataDefinition(), TTAProgram::DataMemory::dataDefinitionsEnd(), SimulatorFrontend::initializeDataMemories(), main(), and MAU().
|
virtual |
Returns start address of data definition.
Definition at line 129 of file DataDefinition.cc.
References start_.
Referenced by TTAProgram::DataMemory::addDataDefinition(), StaticProgramAnalyzer::addProgram(), TTAProgram::DataAddressDef::copy(), TTAProgram::Program::copyDataMemoriesFrom(), TTAProgram::TPEFProgramFactory::createDataMemories(), TTAProgram::ProgramWriter::createDataSections(), TTAProgram::DataMemory::dataDefinition(), TTAProgram::DataMemory::dataDefinitionsEnd(), POMDisassembler::disassembleProgram(), SimulatorFrontend::initializeDataMemories(), main(), MAU(), and TTAProgram::DataMemory::setAddressSpace().
|
private |
Is all the data zeros? (In this case data_ is null)
Definition at line 91 of file DataDefinition.hh.
Referenced by copy(), isInitialized(), and MAU().
|
private |
Init data of definition.
Definition at line 88 of file DataDefinition.hh.
Referenced by copy(), DataDefinition(), isInitialized(), MAU(), and ~DataDefinition().
|
private |
Definition at line 93 of file DataDefinition.hh.
Referenced by copy(), isLittleEndian(), and MAU().
|
private |
Size of uninitialized data definition.
Definition at line 85 of file DataDefinition.hh.
Referenced by copy(), DataDefinition(), and size().
|
private |
Start address of definition.
Definition at line 82 of file DataDefinition.hh.
Referenced by copy(), setStartAddress(), and startAddress().