Go to the documentation of this file.
28 #include <gtest/gtest.h>
30 #include <type_traits>
52 0, 1, 2, 3, 4, 5, 6, 7
55 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0
103 return tc->
ints[state++];
107 template <
typename Arg>
109 typename
std::enable_if<std::is_floating_point<Arg>::value>
::type>
114 return tc->
floats[state++];
128 template <
typename Ret>
130 typename
std::enable_if<std::is_floating_point<Ret>::value>
::type>
148 return tc->
ints[--state];
158 template <
typename Ret>
178 return tc->
ints[state.first++];
182 template <
typename Arg>
184 typename
std::enable_if<std::is_floating_point<Arg>::value>
::type>
189 return tc->
floats[state.second++];
203 template <
typename Ret>
205 typename
std::enable_if<std::is_floating_point<Ret>::value>
::type>
321 invokeSimcall<TestABI_TcInit>(&tc,
testTcInit);
329 int ret = invokeSimcall<TestABI_1D>(&tc,
testIntRet);
336 float ret = invokeSimcall<TestABI_1D>(&tc,
testFloatRet);
351 int ret = invokeSimcall<TestABI_1D, false>(&tc,
testIntRet);
361 int ret = invokeSimcall<TestABI_2D>(&tc,
testIntRet);
368 float ret = invokeSimcall<TestABI_2D>(&tc,
testFloatRet);
static int get(ThreadContext *tc, TestABI_TcInit::State &state)
static int get(ThreadContext *tc, TestABI_1D::State &state)
static void prepare(ThreadContext *tc, TestABI_Prepare::State &state)
static int get(ThreadContext *tc, TestABI_Prepare::State &state)
static void prepare(ThreadContext *tc, TestABI_Prepare::State &state)
float testFloatRet(ThreadContext *tc)
static void store(ThreadContext *tc, const int &ret)
static void store(ThreadContext *tc, const int &ret)
TEST(GuestABI, ABI_1D_args)
#define EXPECT_EQ(lhs, rhs)
A macro which verifies that lhs and rhs are equal to each other.
static const double DefaultFloatResult
#define EXPECT_FALSE(expr)
A macro which verifies that expr evaluates to false.
static Arg get(ThreadContext *tc, TestABI_1D::State &state)
double testDoubleRet(ThreadContext *tc)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
void testPrepareVoid(ThreadContext *tc, int a, int b)
void testTcInit(ThreadContext *tc, int a)
#define EXPECT_TRUE(expr)
A macro which verifies that expr evaluates to true.
int testIntRet(ThreadContext *tc)
static void store(ThreadContext *tc, const Ret &ret)
static int get(ThreadContext *tc, TestABI_2D::State &state)
static const int DefaultIntResult
void test2DVoid(ThreadContext *tc, int a, float b, int c, double d, GuestABI::VarArgs< int, float, double > varargs)
const float FloatRetValue
void testIntVoid(ThreadContext *tc, int a, float b, int c, double d, GuestABI::VarArgs< int, float, double > varargs)
static void store(ThreadContext *tc, const Ret &ret)
Overload hash function for BasicBlockRange type.
static const double floats[]
void dump()
Dump all statistics data to the registered outputs.
State(const ThreadContext *tc)
static Arg get(ThreadContext *tc, TestABI_2D::State &state)
int testPrepareInt(ThreadContext *tc, int a, int b)
static void store(ThreadContext *tc, const Ret &ret)
const double DoubleRetValue
std::string dumpSimcall(std::string name, ThreadContext *tc, std::function< Ret(ThreadContext *, Args...)> target=std::function< Ret(ThreadContext *, Args...)>())
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17