28 #ifndef __SIM_GUEST_ABI_HH__ 29 #define __SIM_GUEST_ABI_HH__ 45 template <
typename ABI,
bool store_ret,
typename Ret,
typename ...Args>
52 auto state = GuestABI::initializeState<ABI>(tc);
57 template <
typename ABI,
typename Ret,
typename ...Args>
62 return invokeSimcall<ABI, true>(tc, target);
65 template <
typename ABI,
bool store_ret,
typename Ret,
typename ...Args>
69 return invokeSimcall<ABI, store_ret>(
73 template <
typename ABI,
typename Ret,
typename ...Args>
77 return invokeSimcall<ABI, true>(tc, target);
80 template <
typename ABI,
typename ...Args>
87 auto state = GuestABI::initializeState<ABI>(tc);
92 template <
typename ABI,
typename ...Args>
105 template <
typename ABI,
typename Ret,
typename ...Args>
111 auto state = GuestABI::initializeState<ABI>(tc);
112 std::ostringstream
ss;
120 template <
typename ABI,
typename Ret,
typename ...Args>
125 return dumpSimcall<ABI>(
129 #endif // __SIM_GUEST_ABI_HH__ std::string dumpSimcall(std::string name, ThreadContext *tc, std::function< Ret(ThreadContext *, Args...)> target=std::function< Ret(ThreadContext *, Args...)>())
const std::string & name()
Ret invokeSimcall(ThreadContext *tc, std::function< Ret(ThreadContext *, Args...)> target)
static void dumpArgsFrom(int count, std::ostream &os, ThreadContext *tc, typename ABI::State &state)
static std::enable_if<!std::is_void< Ret >::value &&store_ret, Ret >::type callFrom(ThreadContext *tc, typename ABI::State &state, std::function< Ret(ThreadContext *)> target)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
static void prepareForArguments(ThreadContext *tc, typename ABI::State &state)
static void prepareForFunction(ThreadContext *tc, typename ABI::State &state)