Separated Architecture and CPUState classes for ARM/Gem5 (*Architecture will be used in the campaign).
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1969 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
30
src/core/sal/arm/Architecture.cc
Normal file
30
src/core/sal/arm/Architecture.cc
Normal file
@ -0,0 +1,30 @@
|
||||
#include "ArmArchitecture.hpp"
|
||||
#include "../Register.hpp"
|
||||
|
||||
namespace fail {
|
||||
|
||||
ArmArchitecture::ArmArchitecture()
|
||||
{
|
||||
fillRegisterList();
|
||||
}
|
||||
|
||||
void ArmArchitecture::fillRegisterList()
|
||||
{
|
||||
// TODO: Add missing registers
|
||||
// 16x 32-Bit GP Registers
|
||||
for (int i = 0; i < 16; i++) {
|
||||
Register *reg = new Register(i, RT_GP, 32);
|
||||
addRegister(reg);
|
||||
}
|
||||
}
|
||||
|
||||
ArmArchitecture::~ArmArchitecture()
|
||||
{
|
||||
std::vector< Register* >::iterator it = m_Registers.begin();
|
||||
while (it != m_Registers.end()) {
|
||||
delete *it;
|
||||
it = m_Registers.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
} // end-of-namespace: fail
|
||||
Reference in New Issue
Block a user