gem5  v20.1.0.0
Classes | Namespaces | Functions | Variables
guest_abi.test.cc File Reference
#include <gtest/gtest.h>
#include <type_traits>
#include <utility>
#include "sim/guest_abi.hh"

Go to the source code of this file.

Classes

class  ThreadContext
 ThreadContext is the external interface to all thread state for anything outside of the CPU. More...
 
struct  TestABI_1D
 
struct  TestABI_Prepare
 
struct  TestABI_2D
 
struct  TestABI_TcInit
 
struct  TestABI_TcInit::State
 
struct  GuestABI::Argument< TestABI_1D, int >
 
struct  GuestABI::Argument< TestABI_1D, Arg, typename std::enable_if< std::is_floating_point< Arg >::value >::type >
 
struct  GuestABI::Result< TestABI_1D, int >
 
struct  GuestABI::Result< TestABI_1D, Ret, typename std::enable_if< std::is_floating_point< Ret >::value >::type >
 
struct  GuestABI::Argument< TestABI_Prepare, int >
 
struct  GuestABI::Result< TestABI_Prepare, Ret >
 
struct  GuestABI::Argument< TestABI_2D, int >
 
struct  GuestABI::Argument< TestABI_2D, Arg, typename std::enable_if< std::is_floating_point< Arg >::value >::type >
 
struct  GuestABI::Result< TestABI_2D, int >
 
struct  GuestABI::Result< TestABI_2D, Ret, typename std::enable_if< std::is_floating_point< Ret >::value >::type >
 
struct  GuestABI::Argument< TestABI_TcInit, int >
 

Namespaces

 GuestABI
 

Functions

void testIntVoid (ThreadContext *tc, int a, float b, int c, double d, GuestABI::VarArgs< int, float, double > varargs)
 
void testPrepareVoid (ThreadContext *tc, int a, int b)
 
int testPrepareInt (ThreadContext *tc, int a, int b)
 
void test2DVoid (ThreadContext *tc, int a, float b, int c, double d, GuestABI::VarArgs< int, float, double > varargs)
 
void testTcInit (ThreadContext *tc, int a)
 
int testIntRet (ThreadContext *tc)
 
float testFloatRet (ThreadContext *tc)
 
double testDoubleRet (ThreadContext *tc)
 
 TEST (GuestABI, ABI_1D_args)
 
 TEST (GuestABI, ABI_Prepare)
 
 TEST (GuestABI, ABI_2D_args)
 
 TEST (GuestABI, ABI_TC_init)
 
 TEST (GuestABI, ABI_returns)
 
 TEST (GuestABI, dumpSimcall)
 
 TEST (GuestABI, isVarArgs)
 

Variables

const int IntRetValue = 50
 
const float FloatRetValue = 3.14
 
const double DoubleRetValue = 12.34
 

Function Documentation

◆ TEST() [1/7]

TEST ( GuestABI  ,
ABI_1D_args   
)

◆ TEST() [2/7]

TEST ( GuestABI  ,
ABI_2D_args   
)

◆ TEST() [3/7]

TEST ( GuestABI  ,
ABI_Prepare   
)

Definition at line 302 of file guest_abi.test.cc.

References testPrepareInt(), and testPrepareVoid().

◆ TEST() [4/7]

TEST ( GuestABI  ,
ABI_returns   
)

◆ TEST() [5/7]

TEST ( GuestABI  ,
ABI_TC_init   
)

Definition at line 317 of file guest_abi.test.cc.

References ThreadContext::intOffset, and testTcInit().

◆ TEST() [6/7]

TEST ( GuestABI  ,
dumpSimcall   
)

Definition at line 382 of file guest_abi.test.cc.

References Stats::dump(), EXPECT_EQ, and testIntVoid().

◆ TEST() [7/7]

TEST ( GuestABI  ,
isVarArgs   
)

Definition at line 389 of file guest_abi.test.cc.

References EXPECT_FALSE, and EXPECT_TRUE.

◆ test2DVoid()

void test2DVoid ( ThreadContext tc,
int  a,
float  b,
int  c,
double  d,
GuestABI::VarArgs< int, float, double >  varargs 
)

◆ testDoubleRet()

double testDoubleRet ( ThreadContext tc)

Definition at line 290 of file guest_abi.test.cc.

References DoubleRetValue.

Referenced by TEST().

◆ testFloatRet()

float testFloatRet ( ThreadContext tc)

Definition at line 289 of file guest_abi.test.cc.

References FloatRetValue.

Referenced by TEST().

◆ testIntRet()

int testIntRet ( ThreadContext tc)

Definition at line 288 of file guest_abi.test.cc.

References IntRetValue.

Referenced by TEST().

◆ testIntVoid()

void testIntVoid ( ThreadContext tc,
int  a,
float  b,
int  c,
double  d,
GuestABI::VarArgs< int, float, double >  varargs 
)

◆ testPrepareInt()

int testPrepareInt ( ThreadContext tc,
int  a,
int  b 
)

Definition at line 253 of file guest_abi.test.cc.

References ArmISA::a, ArmISA::b, EXPECT_EQ, and ThreadContext::ints.

Referenced by TEST().

◆ testPrepareVoid()

void testPrepareVoid ( ThreadContext tc,
int  a,
int  b 
)

Definition at line 246 of file guest_abi.test.cc.

References ArmISA::a, ArmISA::b, EXPECT_EQ, and ThreadContext::ints.

Referenced by TEST().

◆ testTcInit()

void testTcInit ( ThreadContext tc,
int  a 
)

Definition at line 277 of file guest_abi.test.cc.

References ArmISA::a, EXPECT_EQ, ThreadContext::intOffset, and ThreadContext::ints.

Referenced by TEST().

Variable Documentation

◆ DoubleRetValue

const double DoubleRetValue = 12.34

Definition at line 286 of file guest_abi.test.cc.

Referenced by TEST(), and testDoubleRet().

◆ FloatRetValue

const float FloatRetValue = 3.14

Definition at line 285 of file guest_abi.test.cc.

Referenced by TEST(), and testFloatRet().

◆ IntRetValue

const int IntRetValue = 50

Definition at line 284 of file guest_abi.test.cc.

Referenced by TEST(), and testIntRet().


Generated on Wed Sep 30 2020 14:02:19 for gem5 by doxygen 1.8.17