28#ifndef __ARCH_SPARC_SE_WORKLOAD_HH__
29#define __ARCH_SPARC_SE_WORKLOAD_HH__
38#include "params/SparcSEWorkload.hh"
86template <
typename ABI>
88 typename
std::enable_if_t<std::is_base_of_v<
89 SparcISA::SEWorkload::BaseSyscallABI, ABI>>>
97 SparcISA::PSTATE pstate =
102 ccr.xcc.c = ccr.icc.c = 0;
105 ccr.xcc.c = ccr.icc.c = 1;
112 if (ret.
count() == 2)
117template <
typename Arg>
118struct Argument<SparcISA::SEWorkload::SyscallABI32, Arg,
119 typename std::enable_if_t<
120 std::is_integral_v<Arg> &&
121 SparcISA::SEWorkload::SyscallABI32::IsWideV<Arg>>>
129 "Ran out of syscall argument registers.");
130 auto high = ABI::ArgumentRegs[
state++];
131 auto low = ABI::ArgumentRegs[
state++];
132 return (Arg)ABI::mergeRegs(tc, low, high);
static BaseRemoteGDB * build(ListenSocketConfig listen_config, Args... args)
SEWorkload(const Params &p, Addr page_shift=0)
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 auto & SyscallPseudoReturnReg
constexpr auto & ReturnValueReg
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
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)