// checkpointing occurs in the outer transaction only
if (htm_depth == 1) {
- auto new_cpt = new HTMCheckpoint();
+ BaseHTMCheckpointPtr& cpt = xc->tcBase()->getHtmCheckpointPtr();
- new_cpt->save(tc);
- new_cpt->destinationRegister(dest);
+ HTMCheckpoint *armcpt =
+ dynamic_cast<HTMCheckpoint*>(cpt.get());
+ assert(armcpt != nullptr);
- ArmISA::globalClearExclusive(tc);
+ armcpt->save(tc);
+ armcpt->destinationRegister(dest);
- xc->tcBase()->setHtmCheckpointPtr(
- std::unique_ptr<BaseHTMCheckpoint>(new_cpt));
+ ArmISA::globalClearExclusive(tc);
}
xc->setIntRegOperand(this, 0, (Dest64) & mask(intWidth));
#include "arch/arm/isa.hh"
#include "arch/arm/faults.hh"
+#include "arch/arm/htm.hh"
#include "arch/arm/interrupts.hh"
#include "arch/arm/pmu.hh"
#include "arch/arm/self_debug.hh"
{
BaseISA::startup();
- if (tc)
+ if (tc) {
setupThreadContext();
+ if (haveTME) {
+ std::unique_ptr<BaseHTMCheckpoint> cpt(new HTMCheckpoint());
+ tc->setHtmCheckpointPtr(std::move(cpt));
+ }
+ }
+
afterStartup = true;
}