gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::pseudo_inst Namespace Reference

Classes

struct  GuestAddr
 This struct wrapper for Addr enables m5ops for systems with 32 bit pointer, since it allows to distinguish between address arguments and native C++ types. More...
 

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, GuestAddr addr, GuestAddr 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, GuestAddr vaddr, uint64_t len, uint64_t offset)
 
uint64_t writefile (ThreadContext *tc, GuestAddr vaddr, uint64_t len, uint64_t offset, GuestAddr 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)
 
std::ostream & operator<< (std::ostream &os, const GuestAddr addr)
 
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.
 
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()

◆ arm()

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

◆ debugbreak()

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

Definition at line 464 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()

◆ 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 198 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)

◆ operator<<()

std::ostream & gem5::pseudo_inst::operator<< ( std::ostream & os,
const GuestAddr addr )
inline

Definition at line 80 of file pseudo_inst.hh.

References gem5::X86ISA::addr, and gem5::X86ISA::os.

◆ pseudoInst() [1/2]

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

Definition at line 268 of file pseudo_inst.hh.

References pseudoInstWork().

◆ pseudoInst() [2/2]

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

◆ 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 133 of file pseudo_inst.hh.

References addsymbol(), arm(), debugbreak(), DPRINTF, dumpresetstats(), dumpstats(), initParam(), gem5::invokeSimcall(), 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().

Referenced by pseudoInst(), and pseudoInst().

◆ quiesce()

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

Definition at line 117 of file pseudo_inst.cc.

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

Referenced by 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()

◆ resetstats()

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

◆ rpns()

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

Definition at line 154 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 471 of file pseudo_inst.cc.

References DPRINTF, and gem5::exitSimLoop().

Referenced by pseudoInstWork().

◆ togglesync()

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

Definition at line 478 of file pseudo_inst.cc.

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

Referenced by pseudoInstWork().

◆ triggerWorkloadEvent()

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

◆ wakeCPU()

◆ workbegin()

◆ workend()

◆ writefile()


Generated on Tue Jun 18 2024 16:24:21 for gem5 by doxygen 1.11.0