28 #ifndef __ARCH_SPARC_SE_WORKLOAD_HH__
29 #define __ARCH_SPARC_SE_WORKLOAD_HH__
38 #include "params/SparcSEWorkload.hh"
58 gdb = BaseRemoteGDB::build<RemoteGDB>(
87 template <
typename ABI>
89 typename
std::enable_if_t<std::is_base_of_v<
90 SparcISA::SEWorkload::BaseSyscallABI, ABI>>>
98 SparcISA::PSTATE pstate =
103 ccr.xcc.c = ccr.icc.c = 0;
106 ccr.xcc.c = ccr.icc.c = 1;
113 if (ret.
count() == 2)
118 template <
typename Arg>
120 typename std::enable_if_t<
121 std::is_integral_v<Arg> &&
122 SparcISA::SEWorkload::SyscallABI32::IsWideV<Arg>>>
130 "Ran out of syscall argument registers.");
133 return (Arg)ABI::mergeRegs(tc, low,
high);
SEWorkload(const Params &p, Addr page_shift)
void setSystem(System *sys) override
virtual void handleTrap(ThreadContext *tc, int trapNum)
bool is64(ThreadContext *tc)
void setSystem(System *sys) override
virtual void flushWindows(ThreadContext *tc)
This class represents the return value from an emulated system call, including any errno setting.
int64_t returnValue() const
The return value.
int count() const
How many values did the syscall attempt to return?
bool successful() const
Was the system call successful?
int errnoValue() const
The errno value.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual RegVal getReg(const RegId ®) const
virtual void setReg(const RegId ®, RegVal val)
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
const Params & params() const
constexpr RegId ArgumentRegs[]
constexpr auto & SyscallPseudoReturnReg
constexpr auto & ReturnValueReg
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
Overload hash function for BasicBlockRange type.
static const std::vector< RegId > ArgumentRegs
static Arg get(ThreadContext *tc, typename ABI::State &state)
static void store(ThreadContext *tc, const SyscallReturn &ret)