28 #ifndef __SIM_GUEST_ABI_LAYOUT_HH__ 29 #define __SIM_GUEST_ABI_LAYOUT_HH__ 31 #include <type_traits> 44 template <
typename ABI,
typename Enabled=
void>
47 static typename ABI::State
50 return typename ABI::State();
54 template <
typename ABI>
56 std::is_constructible<typename ABI::State, const ThreadContext *>::value
59 static typename ABI::State
62 return typename ABI::State(tc);
66 template <
typename ABI>
67 static typename ABI::State
79 template <
typename ABI,
template <
class ...>
class Role,
80 typename Type,
typename Enabled=
void>
93 template <
typename ABI,
template <
class ...>
class Role,
typename Type>
94 struct Preparer<ABI, Role, Type, decltype((void)&Role<ABI, Type>::prepare)>
99 Role<ABI, Type>::prepare(tc, state);
103 template <
typename ABI,
typename Ret,
typename Enabled=
void>
110 template <
typename ABI>
117 template <
typename ABI,
typename NextArg,
typename ...Args>
125 template <
typename ABI,
typename Ret,
typename ...Args>
129 prepareForResult<ABI, Ret>(tc, state);
138 template <
typename ABI,
typename Ret,
typename Enabled=
void>
148 template <
typename Ret,
typename State>
149 std::true_type
foo(
void (*)(
ThreadContext *,
const Ret &ret, State &state));
151 template <
typename Ret>
154 template <
typename ABI,
typename Ret>
156 std::is_same<void (*)(ThreadContext *, const Ret &, typename ABI::State &),
157 decltype(&Result<ABI, Ret>::store)>::value>
::type>
170 template <
typename ABI,
typename Ret>
177 template <
typename ABI,
typename Arg>
186 #endif // __SIM_GUEST_ABI_LAYOUT_HH__ static Arg getArgument(ThreadContext *tc, typename ABI::State &state)
static void prepare(ThreadContext *tc, typename ABI::State &state)
std::true_type foo(void(*)(ThreadContext *, const Ret &ret, State &state))
static void store(ThreadContext *tc, const Ret &ret)
Overload hash function for BasicBlockRange type.
static void store(ThreadContext *tc, const Ret &ret, typename ABI::State &state)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
static ABI::State initializeState(const ThreadContext *tc)
static Arg get(ThreadContext *tc, typename ABI::State &state)
static void storeResult(ThreadContext *tc, const Ret &ret, typename ABI::State &state)
static ABI::State init(const ThreadContext *tc)
static void prepareForArguments(ThreadContext *tc, typename ABI::State &state)
static void store(ThreadContext *tc, const Ret &ret, typename ABI::State &state)
static void prepare(ThreadContext *tc, typename ABI::State &state)
static void prepareForResult(ThreadContext *tc, typename ABI::State &state)
static void prepareForFunction(ThreadContext *tc, typename ABI::State &state)
static ABI::State init(const ThreadContext *tc)