arch-arm: Instantiate a single HTM checkpoint at ISA::startup
Change-Id: I48cc71dce607233f025387379507bcd485943dde Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35016 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Giacomo Travaglini
parent
5c83d8f74c
commit
d9d4203e04
@@ -109,15 +109,16 @@ Tstart64::completeAcc(PacketPtr pkt, ExecContext *xc,
|
||||
|
||||
// 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);
|
||||
|
||||
armcpt->save(tc);
|
||||
armcpt->destinationRegister(dest);
|
||||
|
||||
ArmISA::globalClearExclusive(tc);
|
||||
|
||||
xc->tcBase()->setHtmCheckpointPtr(
|
||||
std::unique_ptr<BaseHTMCheckpoint>(new_cpt));
|
||||
}
|
||||
|
||||
xc->setIntRegOperand(this, 0, (Dest64) & mask(intWidth));
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#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"
|
||||
@@ -439,9 +440,15 @@ ISA::startup()
|
||||
{
|
||||
BaseISA::startup();
|
||||
|
||||
if (tc)
|
||||
if (tc) {
|
||||
setupThreadContext();
|
||||
|
||||
if (haveTME) {
|
||||
std::unique_ptr<BaseHTMCheckpoint> cpt(new HTMCheckpoint());
|
||||
tc->setHtmCheckpointPtr(std::move(cpt));
|
||||
}
|
||||
}
|
||||
|
||||
afterStartup = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user