gem5  v20.1.0.0
Classes | Typedefs | Functions | Variables
GuestABI Namespace Reference

Classes

struct  Aapcs32ArgumentBase
 
struct  Aapcs32ArrayType
 
struct  Aapcs32ArrayType< E[N]>
 
struct  Aapcs64ArrayType
 
struct  Aapcs64ArrayType< E[N]>
 
struct  Argument
 
struct  Argument< Aapcs32, Composite, typename std::enable_if< IsAapcs32Composite< Composite >::value >::type >
 
struct  Argument< Aapcs32, Float, typename std::enable_if< std::is_floating_point< Float >::value >::type >
 
struct  Argument< Aapcs32Vfp, Composite, typename std::enable_if< IsAapcs32Composite< Composite >::value &&!IsAapcs32HomogeneousAggregate< Composite >::value >::type >
 
struct  Argument< Aapcs32Vfp, Float, typename std::enable_if< std::is_floating_point< Float >::value >::type >
 
struct  Argument< Aapcs32Vfp, HA, typename std::enable_if< IsAapcs32HomogeneousAggregate< HA >::value >::type >
 
struct  Argument< Aapcs32Vfp, Integer, typename std::enable_if< std::is_integral< Integer >::value >::type >
 
struct  Argument< Aapcs32Vfp, VarArgs< Types... > >
 
struct  Argument< Aapcs64, Composite, typename std::enable_if< IsAapcs64Composite< Composite >::value &&!IsAapcs64Hxa< Composite >::value >::type >
 
struct  Argument< Aapcs64, HA, typename std::enable_if< IsAapcs64Hxa< HA >::value >::type >
 
struct  Argument< ABI, Arg, typename std::enable_if< std::is_base_of< ArmProcess32::SyscallABI, ABI >::value &&ABI::template IsWide< Arg >::value >::type >
 
struct  Argument< ABI, Arg, typename std::enable_if< std::is_base_of< GenericSyscallABI64, ABI >::value &&std::is_integral< Arg >::value >::type >
 
struct  Argument< ABI, Arg, typename std::enable_if<!ABI::template IsWide< Arg >::value >::type >
 
struct  Argument< Abi, ArmSemihosting::InPlaceArg, typename std::enable_if< std::is_base_of< ArmSemihosting::AbiBase, Abi >::value >::type >
 
struct  Argument< ABI, ConstProxyPtr< T, Proxy > >
 
struct  Argument< ABI, ProxyPtr< T, Proxy > >
 
struct  Argument< ABI, VarArgs< Types... > >
 
struct  Argument< ArmSemihosting::Abi32, Arg, typename std::enable_if< std::is_integral< Arg >::value >::type >
 
struct  Argument< ArmSemihosting::Abi64, Arg, typename std::enable_if< std::is_integral< Arg >::value >::type >
 
struct  Argument< PseudoInstABI, uint64_t >
 
struct  Argument< SemiPseudoAbi32, T >
 
struct  Argument< SemiPseudoAbi64, T >
 
struct  Argument< Sparc32Process::SyscallABI, Arg, typename std::enable_if< Sparc32Process::SyscallABI::IsWide< Arg >::value >::type >
 
struct  Argument< TestABI, Addr >
 
struct  Argument< TestABI_1D, Arg, typename std::enable_if< std::is_floating_point< Arg >::value >::type >
 
struct  Argument< TestABI_1D, int >
 
struct  Argument< TestABI_2D, Arg, typename std::enable_if< std::is_floating_point< Arg >::value >::type >
 
struct  Argument< TestABI_2D, int >
 
struct  Argument< TestABI_Prepare, int >
 
struct  Argument< TestABI_TcInit, int >
 
struct  Argument< X86ISA::I386LinuxProcess::SyscallABI, Arg, typename std::enable_if< X86ISA::I386LinuxProcess::SyscallABI::IsWide< Arg >::value >::type >
 
struct  Argument< X86PseudoInstABI, uint64_t >
 
struct  enable_if< std::is_integral< Integer >::value &&(sizeof(Integer)< sizeof(uint32_t)) >::type >
 
struct  enable_if< std::is_integral< Integer >::value &&(sizeof(Integer)<=8) >::type >
 
struct  enable_if< std::is_integral< Integer >::value &&(sizeof(Integer)<=8) >::type >
 
struct  enable_if< std::is_integral< Integer >::value &&(sizeof(Integer)<=sizeof(uint32_t)) >::type >
 
struct  IsAapcs32Composite
 
struct  IsAapcs32Composite< T, typename std::enable_if<(std::is_array< T >::value||std::is_class< T >::value||std::is_union< T >::value) &&!IsVarArgs< T >::value >::type >
 
struct  IsAapcs32HomogeneousAggregate
 
struct  IsAapcs32HomogeneousAggregate< E[N]>
 
struct  IsAapcs64Composite
 
struct  IsAapcs64Composite< T, typename std::enable_if<(std::is_array< T >::value||std::is_class< T >::value||std::is_union< T >::value) &&!IsVarArgs< T >::value &&!IsAapcs64ShortVector< T >::value >::type >
 
struct  IsAapcs64Hfa
 
struct  IsAapcs64ShortVector
 
struct  IsAapcs64ShortVector< E[N], typename std::enable_if<(std::is_integral< E >::value||std::is_floating_point< E >::value) &&(sizeof(E) *N==8||sizeof(E) *N==16)>::type >
 
struct  IsConforming
 
struct  IsConforming< Addr >
 
struct  IsVarArgs
 
struct  IsVarArgs< VarArgs< Types... > >
 
struct  Preparer
 
struct  Preparer< ABI, Role, Type, decltype((void)&Role< ABI, Type >::prepare)>
 
struct  Result
 
struct  Result< Aapcs32, Composite, typename std::enable_if< IsAapcs32Composite< Composite >::value >::type >
 
struct  Result< Aapcs32, Float, typename std::enable_if< std::is_floating_point< Float >::value >::type >
 
struct  Result< Aapcs32, Integer, typename std::enable_if< std::is_integral< Integer >::value &&(sizeof(Integer)==sizeof(uint32_t)) >::type >
 
struct  Result< Aapcs32, Integer, typename std::enable_if< std::is_integral< Integer >::value &&(sizeof(Integer)==sizeof(uint64_t)) >::type >
 
struct  Result< Aapcs32Vfp, Composite, typename std::enable_if< IsAapcs32Composite< Composite >::value &&!IsAapcs32HomogeneousAggregate< Composite >::value >::type >
 
struct  Result< Aapcs32Vfp, Float, typename std::enable_if< std::is_floating_point< Float >::value >::type >
 
struct  Result< Aapcs32Vfp, HA, typename std::enable_if< IsAapcs32HomogeneousAggregate< HA >::value >::type >
 
struct  Result< Aapcs32Vfp, Integer, typename std::enable_if< std::is_integral< Integer >::value >::type >
 
struct  Result< Aapcs64, Composite, typename std::enable_if< IsAapcs64Composite< Composite >::value &&!IsAapcs64Hxa< Composite >::value >::type >
 
struct  Result< Aapcs64, HA, typename std::enable_if< IsAapcs64Hxa< HA >::value >::type >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if< std::is_base_of< ArmFreebsdProcessBits::SyscallABI, ABI >::value >::type >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if< std::is_base_of< ArmLinuxProcessBits::SyscallABI, ABI >::value >::type >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if< std::is_base_of< SparcProcess::SyscallABI, ABI >::value >::type >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if< std::is_base_of< X86Linux::SyscallABI, ABI >::value >::type >
 
struct  Result< ABI, void >
 
struct  Result< ArmSemihosting::Abi32, ArmSemihosting::RetErrno >
 
struct  Result< ArmSemihosting::Abi64, ArmSemihosting::RetErrno >
 
struct  Result< MipsProcess::SyscallABI, SyscallReturn >
 
struct  Result< PowerProcess::SyscallABI, SyscallReturn >
 
struct  Result< RiscvProcess::SyscallABI, SyscallReturn >
 
struct  Result< TestABI_1D, int >
 
struct  Result< TestABI_1D, Ret, typename std::enable_if< std::is_floating_point< Ret >::value >::type >
 
struct  Result< TestABI_2D, int >
 
struct  Result< TestABI_2D, Ret, typename std::enable_if< std::is_floating_point< Ret >::value >::type >
 
struct  Result< TestABI_Prepare, Ret >
 
struct  Result< X86PseudoInstABI, T >
 
struct  ResultStorer
 
struct  ResultStorer< ABI, Ret, typename std::enable_if< std::is_same< void(*)(ThreadContext *, const Ret &, typename ABI::State &), decltype(&Result< ABI, Ret >::store)>::value >::type >
 
struct  StateInitializer
 
struct  StateInitializer< ABI, typename std::enable_if< std::is_constructible< typename ABI::State, const ThreadContext * >::value >::type >
 
class  VarArgs
 
class  VarArgsBase
 
class  VarArgsBase< First, Types... >
 
class  VarArgsBase<>
 
class  VarArgsImpl
 
class  VarArgsImpl< ABI, Base >
 
class  VarArgsImpl< ABI, Base, First, Types... >
 

Typedefs

template<typename T , std::size_t count, typename Enabled = void>
using Aapcs32HomogeneousAggregate = T[count]
 

Functions

reg laneView< Float, 0 > ()
 
tc setVecReg (id, reg)
 
template<typename ABI , bool store_ret, typename Ret >
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)
 
template<typename ABI , bool store_ret, typename Ret >
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)
 
template<typename ABI >
static void callFrom (ThreadContext *tc, typename ABI::State &state, std::function< void(ThreadContext *)> target)
 
template<typename ABI , bool store_ret, typename Ret , typename NextArg , typename ... Args>
static std::enable_if<!std::is_void< Ret >::value, Ret >::type callFrom (ThreadContext *tc, typename ABI::State &state, std::function< Ret(ThreadContext *, NextArg, Args...)> target)
 
template<typename ABI , typename NextArg , typename ... Args>
static void callFrom (ThreadContext *tc, typename ABI::State &state, std::function< void(ThreadContext *, NextArg, Args...)> target)
 
template<typename ABI , typename Ret >
static void dumpArgsFrom (int count, std::ostream &os, ThreadContext *tc, typename ABI::State &state)
 
template<typename ABI , typename Ret , typename NextArg , typename ... Args>
static void dumpArgsFrom (int count, std::ostream &os, ThreadContext *tc, typename ABI::State &state)
 
template<typename ABI >
static ABI::State initializeState (const ThreadContext *tc)
 
template<typename ABI , typename Ret , typename Enabled = void>
static void prepareForResult (ThreadContext *tc, typename ABI::State &state)
 
template<typename ABI >
static void prepareForArguments (ThreadContext *tc, typename ABI::State &state)
 
template<typename ABI , typename NextArg , typename ... Args>
static void prepareForArguments (ThreadContext *tc, typename ABI::State &state)
 
template<typename ABI , typename Ret , typename ... Args>
static void prepareForFunction (ThreadContext *tc, typename ABI::State &state)
 
template<typename Ret , typename State >
std::true_type foo (void(*)(ThreadContext *, const Ret &ret, State &state))
 
template<typename Ret >
std::false_type foo (void(*)(ThreadContext *, const Ret &ret))
 
template<typename ABI , typename Ret >
static void storeResult (ThreadContext *tc, const Ret &ret, typename ABI::State &state)
 
template<typename ABI , typename Arg >
static Arg getArgument (ThreadContext *tc, typename ABI::State &state)
 
template<typename ... Types>
std::ostream & operator<< (std::ostream &os, const VarArgs< Types... > &va)
 

Variables

template<typename E , size_t N>
struct IsAapcs64Hfa< E[N], typename std::enable_if< std::is_floating_point< E >::value &&N<=4 >::type > :public std::true_type{};template< typename T, typename Enabled=void >struct IsAapcs64Hva :public std::false_type {};template< typename E, size_t N >struct IsAapcs64Hva< E[N], typename std::enable_if< IsAapcs64ShortVector< E >::value &&N<=4 >::type > :public std::true_type{};template< typename T, typename Enabled=void >struct IsAapcs64Hxa :public std::false_type {};template< typename T >struct IsAapcs64Hxa< T, typename std::enable_if< IsAapcs64Hfa< T >::value||IsAapcs64Hva< T >::value >::type > :public std::true_type{};struct Aapcs64ArgumentBase{ template< typename T > static T loadFromStack(ThreadContext *tc, Aapcs64::State &state) { size_t align=std::max< size_t >(8, alignof(T));size_t size=roundUp(sizeof(T), 8);state.nsaa=roundUp(state.nsaa, align);ConstVPtr< T > val(state.nsaa, tc);state.nsaa+=size;return gtoh(*val, ArmISA::byteOrder(tc));}};template< typename Float >struct Argument< Aapcs64, Float, typename std::enable_if< std::is_floating_point< Float >::value||IsAapcs64ShortVector< Float >::value >::type > :public Aapcs64ArgumentBase{ static Float get(ThreadContext *tc, Aapcs64::State &state) { if(state.nsrn<=state.MAX_SRN) { RegId id(VecRegClass, state.nsrn++);return tc->readVecReg(id).laneView< Float, 0 >();} return loadFromStack< Float >(tc, state);}};template< typename Float >struct Result< Aapcs64, Float, typename std::enable_if< std::is_floating_point< Float >::value||IsAapcs64ShortVector< Float >::value >::type >{ static void store(ThreadContext *tc, const Float &f) { RegId id(VecRegClass, 0);auto reg=tc-> readVecReg (id)
 

Typedef Documentation

◆ Aapcs32HomogeneousAggregate

template<typename T , std::size_t count, typename Enabled = void>
using GuestABI::Aapcs32HomogeneousAggregate = typedef T[count]

Definition at line 92 of file aapcs32.hh.

Function Documentation

◆ callFrom() [1/5]

template<typename ABI , bool store_ret, typename Ret >
static std::enable_if<!std::is_void<Ret>::value && store_ret, Ret>::type GuestABI::callFrom ( ThreadContext tc,
typename ABI::State &  state,
std::function< Ret(ThreadContext *)>  target 
)
static

Definition at line 58 of file dispatch.hh.

Referenced by callFrom(), and invokeSimcall().

◆ callFrom() [2/5]

template<typename ABI , bool store_ret, typename Ret >
static std::enable_if<!std::is_void<Ret>::value && !store_ret, Ret>::type GuestABI::callFrom ( ThreadContext tc,
typename ABI::State &  state,
std::function< Ret(ThreadContext *)>  target 
)
static

Definition at line 69 of file dispatch.hh.

◆ callFrom() [3/5]

template<typename ABI , bool store_ret, typename Ret , typename NextArg , typename ... Args>
static std::enable_if<!std::is_void<Ret>::value, Ret>::type GuestABI::callFrom ( ThreadContext tc,
typename ABI::State &  state,
std::function< Ret(ThreadContext *, NextArg, Args...)>  target 
)
static

Definition at line 89 of file dispatch.hh.

References callFrom().

◆ callFrom() [4/5]

template<typename ABI >
static void GuestABI::callFrom ( ThreadContext tc,
typename ABI::State &  state,
std::function< void(ThreadContext *)>  target 
)
static

Definition at line 78 of file dispatch.hh.

◆ callFrom() [5/5]

template<typename ABI , typename NextArg , typename ... Args>
static void GuestABI::callFrom ( ThreadContext tc,
typename ABI::State &  state,
std::function< void(ThreadContext *, NextArg, Args...)>  target 
)
static

Definition at line 109 of file dispatch.hh.

References callFrom().

◆ dumpArgsFrom() [1/2]

template<typename ABI , typename Ret >
static void GuestABI::dumpArgsFrom ( int  count,
std::ostream &  os,
ThreadContext tc,
typename ABI::State &  state 
)
static

Definition at line 135 of file dispatch.hh.

References X86ISA::os.

Referenced by dumpArgsFrom(), and dumpSimcall().

◆ dumpArgsFrom() [2/2]

template<typename ABI , typename Ret , typename NextArg , typename ... Args>
static void GuestABI::dumpArgsFrom ( int  count,
std::ostream &  os,
ThreadContext tc,
typename ABI::State &  state 
)
static

Definition at line 146 of file dispatch.hh.

References X86ISA::count, dumpArgsFrom(), and X86ISA::os.

◆ foo() [1/2]

template<typename Ret >
std::false_type GuestABI::foo ( void(*)(ThreadContext *, const Ret &ret)  )

◆ foo() [2/2]

template<typename Ret , typename State >
std::true_type GuestABI::foo ( void(*)(ThreadContext *, const Ret &ret, State &state)  )

◆ getArgument()

template<typename ABI , typename Arg >
static Arg GuestABI::getArgument ( ThreadContext tc,
typename ABI::State &  state 
)
static

◆ initializeState()

template<typename ABI >
static ABI::State GuestABI::initializeState ( const ThreadContext tc)
static

Definition at line 68 of file layout.hh.

References GuestABI::StateInitializer< ABI, Enabled >::init().

◆ laneView< Float, 0 >()

reg GuestABI::laneView< Float, 0 > ( )

◆ operator<<()

template<typename ... Types>
std::ostream& GuestABI::operator<< ( std::ostream &  os,
const VarArgs< Types... > &  va 
)

Definition at line 177 of file varargs.hh.

References X86ISA::os.

◆ prepareForArguments() [1/2]

template<typename ABI >
static void GuestABI::prepareForArguments ( ThreadContext tc,
typename ABI::State &  state 
)
static

Definition at line 112 of file layout.hh.

Referenced by invokeSimcall(), prepareForArguments(), and prepareForFunction().

◆ prepareForArguments() [2/2]

template<typename ABI , typename NextArg , typename ... Args>
static void GuestABI::prepareForArguments ( ThreadContext tc,
typename ABI::State &  state 
)
static

◆ prepareForFunction()

template<typename ABI , typename Ret , typename ... Args>
static void GuestABI::prepareForFunction ( ThreadContext tc,
typename ABI::State &  state 
)
static

Definition at line 127 of file layout.hh.

References prepareForArguments().

Referenced by dumpSimcall(), and invokeSimcall().

◆ prepareForResult()

template<typename ABI , typename Ret , typename Enabled = void>
static void GuestABI::prepareForResult ( ThreadContext tc,
typename ABI::State &  state 
)
static

◆ setVecReg()

tc GuestABI::setVecReg ( id  ,
reg   
)

◆ storeResult()

template<typename ABI , typename Ret >
static void GuestABI::storeResult ( ThreadContext tc,
const Ret &  ret,
typename ABI::State &  state 
)
static

Definition at line 172 of file layout.hh.

References GuestABI::ResultStorer< ABI, Ret, Enabled >::store().

Variable Documentation

◆ readVecReg

template<typename E , size_t N>
struct IsAapcs64Hfa< E[N], typename std::enable_if< std::is_floating_point< E >::value && N<=4 >::type > :public std::true_type{};template< typename T, typename Enabled=void >struct IsAapcs64Hva :public std::false_type {};template< typename E, size_t N >struct IsAapcs64Hva< E[N], typename std::enable_if< IsAapcs64ShortVector< E >::value && N<=4 >::type > :public std::true_type{};template< typename T, typename Enabled=void >struct IsAapcs64Hxa :public std::false_type {};template< typename T >struct IsAapcs64Hxa< T, typename std::enable_if< IsAapcs64Hfa< T >::value||IsAapcs64Hva< T >::value >::type > : public std::true_type{};struct Aapcs64ArgumentBase{ template< typename T > static T loadFromStack(ThreadContext *tc, Aapcs64::State &state) { size_t align=std::max< size_t >(8, alignof(T)); size_t size=roundUp(sizeof(T), 8); state.nsaa=roundUp(state.nsaa, align); ConstVPtr< T > val(state.nsaa, tc); state.nsaa+=size; return gtoh(*val, ArmISA::byteOrder(tc)); }};template< typename Float >struct Argument< Aapcs64, Float, typename std::enable_if< std::is_floating_point< Float >::value|| IsAapcs64ShortVector< Float >::value >::type > : public Aapcs64ArgumentBase{ static Float get(ThreadContext *tc, Aapcs64::State &state) { if(state.nsrn<=state.MAX_SRN) { RegId id(VecRegClass, state.nsrn++); return tc->readVecReg(id).laneView< Float, 0 >(); } return loadFromStack< Float >(tc, state); }};template< typename Float >struct Result< Aapcs64, Float, typename std::enable_if< std::is_floating_point< Float >::value|| IsAapcs64ShortVector< Float >::value >::type >{ static void store(ThreadContext *tc, const Float &f) { RegId id(VecRegClass, 0); auto reg=tc-> GuestABI::readVecReg(id)

Definition at line 203 of file aapcs64.hh.

Referenced by FullO3CPU< O3CPUImpl >::readArchVecReg().


Generated on Wed Sep 30 2020 14:03:05 for gem5 by doxygen 1.8.17