gem5  v20.1.0.0
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
ArmISA::HTMCheckpoint Class Reference

#include <htm.hh>

Inheritance diagram for ArmISA::HTMCheckpoint:
BaseHTMCheckpoint

Public Member Functions

 HTMCheckpoint ()
 
void reset () override
 Resets the checkpoint once a transaction has completed. More...
 
void save (ThreadContext *tc) override
 Every ISA implementing HTM support should override the save method. More...
 
void restore (ThreadContext *tc, HtmFailureFaultCause cause) override
 Every ISA implementing HTM support should override the restore method. More...
 
void destinationRegister (RegIndex dest)
 
void cancelReason (uint16_t reason)
 
- Public Member Functions inherited from BaseHTMCheckpoint
 BaseHTMCheckpoint ()
 
virtual ~BaseHTMCheckpoint ()
 
bool valid () const
 
uint64_t newHtmUid ()
 Generates a new HTM identifier (used when starting a new transaction) More...
 
uint64_t getHtmUid () const
 Returns the current HTM identifier. More...
 
void setHtmUid (uint64_t new_htm_uid)
 Sets the current HTM identifier. More...
 

Static Public Attributes

const static int MAX_HTM_DEPTH = 255
 

Private Attributes

uint8_t rt
 
Addr nPc
 
std::array< RegVal, NumIntArchRegsx
 
std::array< VecRegContainer, NumVecRegsz
 
std::array< VecPredRegContainer, NumVecRegsp
 
Addr sp
 
uint16_t tcreason
 
uint32_t fpcr
 
uint32_t fpsr
 
uint32_t iccPmrEl1
 
uint8_t nzcv
 
uint8_t daif
 
PCState pcstateckpt
 

Additional Inherited Members

- Protected Attributes inherited from BaseHTMCheckpoint
bool _valid
 

Detailed Description

Definition at line 54 of file htm.hh.

Constructor & Destructor Documentation

◆ HTMCheckpoint()

ArmISA::HTMCheckpoint::HTMCheckpoint ( )
inline

Definition at line 57 of file htm.hh.

Member Function Documentation

◆ cancelReason()

void ArmISA::HTMCheckpoint::cancelReason ( uint16_t  reason)
inline

Definition at line 68 of file htm.hh.

References tcreason.

◆ destinationRegister()

void ArmISA::HTMCheckpoint::destinationRegister ( RegIndex  dest)
inline

Definition at line 67 of file htm.hh.

References rt.

◆ reset()

void ArmISA::HTMCheckpoint::reset ( )
overridevirtual

Resets the checkpoint once a transaction has completed.

The method is bringing up the checkpoint to a known reset state so that it can be reused. ISA specific checkpoints inheriting from this class should override this method so that they can reset their own ISA specific state.

Reimplemented from BaseHTMCheckpoint.

Definition at line 42 of file htm.cc.

References daif, fpcr, fpsr, ArmISA::i, iccPmrEl1, nPc, ArmISA::NumVecPredRegs, ArmISA::NumVecRegs, nzcv, p, pcstateckpt, BaseHTMCheckpoint::reset(), rt, sp, tcreason, x, and z.

◆ restore()

void ArmISA::HTMCheckpoint::restore ( ThreadContext tc,
HtmFailureFaultCause  cause 
)
overridevirtual

Every ISA implementing HTM support should override the restore method.

This is called once a transaction gets aborted and the architectural state needs to be reverted. This will restore the checkpointed arch state.

Parameters
tcthread context to be restored
causethe reason why the transaction has been aborted

Reimplemented from BaseHTMCheckpoint.

Definition at line 93 of file htm.cc.

References bits(), ArmISA::daif, EXCEPTION, EXPLICIT, ArmISA::INTREG_SPX, MEMORY, ArmISA::MISCREG_DAIF, ArmISA::MISCREG_FPCR, ArmISA::MISCREG_FPSR, ArmISA::MISCREG_NZCV, ArmISA::n, NEST, ArmISA::NumIntArchRegs, ArmISA::NumVecPredRegs, ArmISA::NumVecRegs, OTHER, MipsISA::p, panic, ThreadContext::pcState(), replaceBits(), BaseHTMCheckpoint::restore(), ArmISA::rt, ThreadContext::setIntReg(), ThreadContext::setMiscReg(), ThreadContext::setVecPredReg(), ThreadContext::setVecReg(), SIZE, ArmISA::sp, VecPredRegClass, VecRegClass, RiscvISA::x, and ArmISA::z.

◆ save()

void ArmISA::HTMCheckpoint::save ( ThreadContext tc)
overridevirtual

Every ISA implementing HTM support should override the save method.

This is called once a transaction starts and the architectural state needs to be saved. This will checkpoint the arch state.

Parameters
tcthread context state to be saved

Reimplemented from BaseHTMCheckpoint.

Definition at line 66 of file htm.cc.

References ArmISA::daif, ArmISA::INTREG_SPX, ArmISA::MISCREG_DAIF, ArmISA::MISCREG_FPCR, ArmISA::MISCREG_FPSR, ArmISA::MISCREG_NZCV, ArmISA::n, ArmISA::NumIntArchRegs, ArmISA::NumVecPredRegs, ArmISA::NumVecRegs, MipsISA::p, ThreadContext::pcState(), ThreadContext::readIntReg(), ThreadContext::readMiscReg(), ThreadContext::readVecPredReg(), ThreadContext::readVecReg(), BaseHTMCheckpoint::save(), ArmISA::sp, VecPredRegClass, VecRegClass, RiscvISA::x, and ArmISA::z.

Member Data Documentation

◆ daif

uint8_t ArmISA::HTMCheckpoint::daif
private

Definition at line 82 of file htm.hh.

Referenced by reset().

◆ fpcr

uint32_t ArmISA::HTMCheckpoint::fpcr
private

Definition at line 78 of file htm.hh.

Referenced by reset().

◆ fpsr

uint32_t ArmISA::HTMCheckpoint::fpsr
private

Definition at line 79 of file htm.hh.

Referenced by reset().

◆ iccPmrEl1

uint32_t ArmISA::HTMCheckpoint::iccPmrEl1
private

Definition at line 80 of file htm.hh.

Referenced by reset().

◆ MAX_HTM_DEPTH

const static int ArmISA::HTMCheckpoint::MAX_HTM_DEPTH = 255
static

Definition at line 61 of file htm.hh.

◆ nPc

Addr ArmISA::HTMCheckpoint::nPc
private

Definition at line 72 of file htm.hh.

Referenced by reset().

◆ nzcv

uint8_t ArmISA::HTMCheckpoint::nzcv
private

Definition at line 81 of file htm.hh.

Referenced by reset().

◆ p

std::array<VecPredRegContainer, NumVecRegs> ArmISA::HTMCheckpoint::p
private

Definition at line 75 of file htm.hh.

Referenced by reset().

◆ pcstateckpt

PCState ArmISA::HTMCheckpoint::pcstateckpt
private

Definition at line 83 of file htm.hh.

Referenced by reset().

◆ rt

uint8_t ArmISA::HTMCheckpoint::rt
private

Definition at line 71 of file htm.hh.

Referenced by destinationRegister(), and reset().

◆ sp

Addr ArmISA::HTMCheckpoint::sp
private

Definition at line 76 of file htm.hh.

Referenced by reset().

◆ tcreason

uint16_t ArmISA::HTMCheckpoint::tcreason
private

Definition at line 77 of file htm.hh.

Referenced by cancelReason(), and reset().

◆ x

std::array<RegVal, NumIntArchRegs> ArmISA::HTMCheckpoint::x
private

Definition at line 73 of file htm.hh.

Referenced by reset().

◆ z

std::array<VecRegContainer, NumVecRegs> ArmISA::HTMCheckpoint::z
private

Definition at line 74 of file htm.hh.

Referenced by reset().


The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:02:36 for gem5 by doxygen 1.8.17