gem5  v22.1.0.0
Functions
gem5::pseudo_inst Namespace Reference

Functions

void arm (ThreadContext *tc)
 
void quiesce (ThreadContext *tc)
 
void quiesceSkip (ThreadContext *tc)
 
void quiesceNs (ThreadContext *tc, uint64_t ns)
 
void quiesceCycles (ThreadContext *tc, uint64_t cycles)
 
uint64_t quiesceTime (ThreadContext *tc)
 
uint64_t rpns (ThreadContext *tc)
 
void wakeCPU (ThreadContext *tc, uint64_t cpuid)
 
void m5exit (ThreadContext *tc, Tick delay)
 
uint64_t m5sum (ThreadContext *tc, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e, uint64_t f)
 
void m5fail (ThreadContext *tc, Tick delay, uint64_t code)
 
void loadsymbol (ThreadContext *tc)
 
void addsymbol (ThreadContext *tc, Addr addr, Addr symbolAddr)
 
uint64_t initParam (ThreadContext *tc, uint64_t key_str1, uint64_t key_str2)
 
void resetstats (ThreadContext *tc, Tick delay, Tick period)
 
void dumpstats (ThreadContext *tc, Tick delay, Tick period)
 
void dumpresetstats (ThreadContext *tc, Tick delay, Tick period)
 
void m5checkpoint (ThreadContext *tc, Tick delay, Tick period)
 
uint64_t readfile (ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
 
uint64_t writefile (ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset, Addr filename_addr)
 
void debugbreak (ThreadContext *tc)
 
void switchcpu (ThreadContext *tc)
 
void togglesync (ThreadContext *tc)
 
void triggerWorkloadEvent (ThreadContext *tc)
 
void workbegin (ThreadContext *tc, uint64_t workid, uint64_t threadid)
 
void workend (ThreadContext *tc, uint64_t workid, uint64_t threadid)
 
static void decodeAddrOffset (Addr offset, uint8_t &func)
 
void m5Syscall (ThreadContext *tc)
 
template<typename ABI , bool store_ret>
bool pseudoInstWork (ThreadContext *tc, uint8_t func, uint64_t &result)
 Execute a decoded M5 pseudo instruction. More...
 
template<typename ABI , bool store_ret = false>
bool pseudoInst (ThreadContext *tc, uint8_t func, uint64_t &result)
 
template<typename ABI , bool store_ret = true>
bool pseudoInst (ThreadContext *tc, uint8_t func)
 

Function Documentation

◆ addsymbol()

void gem5::pseudo_inst::addsymbol ( ThreadContext tc,
Addr  addr,
Addr  symbolAddr 
)

◆ arm()

void gem5::pseudo_inst::arm ( ThreadContext tc)

◆ debugbreak()

void gem5::pseudo_inst::debugbreak ( ThreadContext tc)

Definition at line 460 of file pseudo_inst.cc.

References gem5::debug::breakpoint(), and DPRINTF.

Referenced by pseudoInstWork().

◆ decodeAddrOffset()

static void gem5::pseudo_inst::decodeAddrOffset ( Addr  offset,
uint8_t &  func 
)
inlinestatic

◆ dumpresetstats()

void gem5::pseudo_inst::dumpresetstats ( ThreadContext tc,
Tick  delay,
Tick  period 
)

◆ dumpstats()

void gem5::pseudo_inst::dumpstats ( ThreadContext tc,
Tick  delay,
Tick  period 
)

◆ initParam()

uint64_t gem5::pseudo_inst::initParam ( ThreadContext tc,
uint64_t  key_str1,
uint64_t  key_str2 
)

◆ loadsymbol()

void gem5::pseudo_inst::loadsymbol ( ThreadContext tc)

◆ m5checkpoint()

void gem5::pseudo_inst::m5checkpoint ( ThreadContext tc,
Tick  delay,
Tick  period 
)

◆ m5exit()

void gem5::pseudo_inst::m5exit ( ThreadContext tc,
Tick  delay 
)

◆ m5fail()

void gem5::pseudo_inst::m5fail ( ThreadContext tc,
Tick  delay,
uint64_t  code 
)

Definition at line 199 of file pseudo_inst.cc.

References gem5::curTick(), DPRINTF, gem5::exitSimLoop(), and gem5::sim_clock::as_int::ns.

Referenced by pseudoInstWork().

◆ m5sum()

uint64_t gem5::pseudo_inst::m5sum ( ThreadContext tc,
uint64_t  a,
uint64_t  b,
uint64_t  c,
uint64_t  d,
uint64_t  e,
uint64_t  f 
)

◆ m5Syscall()

void gem5::pseudo_inst::m5Syscall ( ThreadContext tc)

◆ pseudoInst() [1/2]

template<typename ABI , bool store_ret = true>
bool gem5::pseudo_inst::pseudoInst ( ThreadContext tc,
uint8_t  func 
)

Definition at line 249 of file pseudo_inst.hh.

◆ pseudoInst() [2/2]

template<typename ABI , bool store_ret = false>
bool gem5::pseudo_inst::pseudoInst ( ThreadContext tc,
uint8_t  func,
uint64_t &  result 
)

Definition at line 242 of file pseudo_inst.hh.

◆ pseudoInstWork()

template<typename ABI , bool store_ret>
bool gem5::pseudo_inst::pseudoInstWork ( ThreadContext tc,
uint8_t  func,
uint64_t &  result 
)

Execute a decoded M5 pseudo instruction.

The ISA-specific code is responsible to decode the pseudo inst function number and subfunction number. After that has been done, the rest of the instruction can be implemented in an ISA-agnostic manner using the ISA-specific getArguments functions.

Parameters
funcM5 pseudo op major function number (see utility/m5/m5ops.h)
resultA reference to a uint64_t to store a result in.
Returns
Whether the pseudo instruction was recognized/handled.

Definition at line 114 of file pseudo_inst.hh.

References addsymbol(), arm(), debugbreak(), DPRINTF, dumpresetstats(), dumpstats(), initParam(), loadsymbol(), m5checkpoint(), m5exit(), m5fail(), m5sum(), panic, gem5::ThreadContext::pcState(), quiesce(), quiesceCycles(), quiesceNs(), quiesceTime(), readfile(), resetstats(), rpns(), switchcpu(), togglesync(), triggerWorkloadEvent(), wakeCPU(), warn, workbegin(), workend(), and writefile().

◆ quiesce()

void gem5::pseudo_inst::quiesce ( ThreadContext tc)

Definition at line 118 of file pseudo_inst.cc.

References DPRINTF, and gem5::ThreadContext::quiesce().

Referenced by gem5::o3::Fetch::fetch(), and pseudoInstWork().

◆ quiesceCycles()

void gem5::pseudo_inst::quiesceCycles ( ThreadContext tc,
uint64_t  cycles 
)

◆ quiesceNs()

void gem5::pseudo_inst::quiesceNs ( ThreadContext tc,
uint64_t  ns 
)

◆ quiesceSkip()

void gem5::pseudo_inst::quiesceSkip ( ThreadContext tc)

◆ quiesceTime()

uint64_t gem5::pseudo_inst::quiesceTime ( ThreadContext tc)

◆ readfile()

uint64_t gem5::pseudo_inst::readfile ( ThreadContext tc,
Addr  vaddr,
uint64_t  len,
uint64_t  offset 
)

◆ resetstats()

void gem5::pseudo_inst::resetstats ( ThreadContext tc,
Tick  delay,
Tick  period 
)

◆ rpns()

uint64_t gem5::pseudo_inst::rpns ( ThreadContext tc)

Definition at line 155 of file pseudo_inst.cc.

References gem5::curTick(), DPRINTF, and gem5::sim_clock::as_int::ns.

Referenced by pseudoInstWork().

◆ switchcpu()

void gem5::pseudo_inst::switchcpu ( ThreadContext tc)

Definition at line 467 of file pseudo_inst.cc.

References DPRINTF, and gem5::exitSimLoop().

Referenced by pseudoInstWork().

◆ togglesync()

void gem5::pseudo_inst::togglesync ( ThreadContext tc)

Definition at line 474 of file pseudo_inst.cc.

References DPRINTF, and gem5::DistIface::toggleSync().

Referenced by pseudoInstWork().

◆ triggerWorkloadEvent()

void gem5::pseudo_inst::triggerWorkloadEvent ( ThreadContext tc)

◆ wakeCPU()

void gem5::pseudo_inst::wakeCPU ( ThreadContext tc,
uint64_t  cpuid 
)

◆ workbegin()

void gem5::pseudo_inst::workbegin ( ThreadContext tc,
uint64_t  workid,
uint64_t  threadid 
)

◆ workend()

void gem5::pseudo_inst::workend ( ThreadContext tc,
uint64_t  workid,
uint64_t  threadid 
)

◆ writefile()

uint64_t gem5::pseudo_inst::writefile ( ThreadContext tc,
Addr  vaddr,
uint64_t  len,
uint64_t  offset,
Addr  filename_addr 
)

Generated on Wed Dec 21 2022 10:24:20 for gem5 by doxygen 1.9.1