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;
107 val =
bits(val, 31, 0);
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__ const int SyscallPseudoReturnReg
const std::vector< int > ArgumentRegs
static void store(ThreadContext *tc, const SyscallReturn &ret)
SparcProcess(ProcessParams *params, ::Loader::ObjectFile *objFile, Addr _StackBias)
virtual RegVal readIntReg(RegIndex reg_idx) const =0
bool successful() const
Was the system call successful?
static const std::vector< int > ArgumentRegs
void argsInit(int pageSize)
Overload hash function for BasicBlockRange type.
T roundUp(const T &val, const U &align)
This function is used to align addresses in memory.
std::shared_ptr< MemState > memState
ThreadContext is the external interface to all thread state for anything outside of the CPU...
int errnoValue() const
The errno value.
virtual void flushWindows(ThreadContext *tc)=0
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
const Params * params() const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int count() const
How many values did the syscall attempt to return?
#define ULL(N)
uint64_t constant
int64_t returnValue() const
The return value.
Sparc64Process(ProcessParams *params, ::Loader::ObjectFile *objFile)
bool suppressed() const
Should returning this value be suppressed?
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
Declarations of a non-full system Page Table.
::Loader::MemoryImage image
virtual void handleTrap(int trapNum, ThreadContext *tc, Fault *fault)
bool needsRetry() const
Does the syscall need to be retried?
Sparc32Process(ProcessParams *params, ::Loader::ObjectFile *objFile)
This class represents the return value from an emulated system call, including any errno setting...
T bits(T val, int first, int 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...
std::shared_ptr< FaultBase > Fault
::Loader::ObjectFile * objFile
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.