Go to the documentation of this file.
29 #ifndef __SPARC_PROCESS_HH__
30 #define __SPARC_PROCESS_HH__
58 template<
class IntType>
80 template <
typename ABI>
82 typename
std::enable_if<std::is_base_of<
83 SparcProcess::SyscallABI, ABI>::value>
::type>
94 SparcISA::PSTATE pstate =
99 ccr.xcc.c = ccr.icc.c = 0;
102 ccr.xcc.c = ccr.icc.c = 1;
109 if (ret.
count() == 2)
127 Addr max_stack_size = 8 * 1024 * 1024;
131 Addr stack_base = 0xf0000000
ULL;
134 Addr next_thread_stack_base = stack_base - max_stack_size;
137 Addr mmap_end = 0x70000000;
139 memState = std::make_shared<MemState>(
this, brk_point, stack_base,
141 next_thread_stack_base,
149 void argsInit(
int intSize,
int pageSize);
161 template <
typename Arg>
163 typename std::enable_if<
164 Sparc32Process::SyscallABI::IsWide<Arg>::value>
::type>
172 "Ran out of syscall argument registers.");
175 return (Arg)ABI::mergeRegs(tc, low, high);
191 Addr max_stack_size = 8 * 1024 * 1024;
195 Addr stack_base = 0x80000000000
ULL;
198 Addr next_thread_stack_base = stack_base - max_stack_size;
201 Addr mmap_end = 0xfffff80000000000
ULL;
203 memState = std::make_shared<MemState>(
this, brk_point, stack_base,
205 next_thread_stack_base,
213 void argsInit(
int intSize,
int pageSize);
222 #endif // __SPARC_PROCESS_HH__
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
const std::vector< int > ArgumentRegs
static const std::vector< int > ArgumentRegs
static void store(ThreadContext *tc, const SyscallReturn &ret)
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
void flushWindows(ThreadContext *tc) override
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
Sparc32Process(ProcessParams *params, ::Loader::ObjectFile *objFile)
int64_t returnValue() const
The return value.
bool suppressed() const
Should returning this value be suppressed?
ThreadContext is the external interface to all thread state for anything outside of the CPU.
int errnoValue() const
The errno value.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
bool needsRetry() const
Does the syscall need to be retried?
virtual void flushWindows(ThreadContext *tc)=0
::Loader::MemoryImage image
Sparc64Process(ProcessParams *params, ::Loader::ObjectFile *objFile)
void argsInit(int intSize, int pageSize)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
::Loader::ObjectFile * objFile
This class represents the return value from an emulated system call, including any errno setting.
const Params * params() const
void argsInit(int intSize, int pageSize)
void argsInit(int pageSize)
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Overload hash function for BasicBlockRange type.
SparcProcess(ProcessParams *params, ::Loader::ObjectFile *objFile, Addr _StackBias)
T roundUp(const T &val, const U &align)
This function is used to align addresses in memory.
static Arg get(ThreadContext *tc, typename ABI::State &state)
int count() const
How many values did the syscall attempt to return?
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
void flushWindows(ThreadContext *tc) override
virtual RegVal readIntReg(RegIndex reg_idx) const =0
const int SyscallPseudoReturnReg
virtual void handleTrap(int trapNum, ThreadContext *tc)
#define ULL(N)
uint64_t constant
std::shared_ptr< MemState > memState
bool successful() const
Was the system call successful?
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Generated on Wed Sep 30 2020 14:02:00 for gem5 by doxygen 1.8.17