gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::guest_abi Namespace Reference

Classes

struct  Aapcs32ArgumentBase
 
struct  Aapcs32ArrayType
 
struct  Aapcs32ArrayType< E[N]>
 
struct  Aapcs64ArgumentBase
 
struct  Aapcs64ArrayType
 
struct  Aapcs64ArrayType< E[N]>
 
struct  Argument
 
struct  Argument< Aapcs32, Composite, typename std::enable_if_t< IsAapcs32CompositeV< Composite > > >
 
struct  Argument< Aapcs32, Float, typename std::enable_if_t< std::is_floating_point_v< Float > > >
 
struct  Argument< Aapcs32, Integer, typename std::enable_if_t< std::is_integral_v< Integer > &&(sizeof(Integer) > sizeof(uint32_t)) > >
 
struct  Argument< Aapcs32, Integer, typename std::enable_if_t< std::is_integral_v< Integer > &&(sizeof(Integer)<=sizeof(uint32_t)) > >
 
struct  Argument< Aapcs32Vfp, Composite, typename std::enable_if_t< IsAapcs32CompositeV< Composite > &&!IsAapcs32HomogeneousAggregateV< Composite > > >
 
struct  Argument< Aapcs32Vfp, Float, typename std::enable_if_t< std::is_floating_point_v< Float > > >
 
struct  Argument< Aapcs32Vfp, HA, typename std::enable_if_t< IsAapcs32HomogeneousAggregateV< HA > > >
 
struct  Argument< Aapcs32Vfp, Integer, typename std::enable_if_t< std::is_integral_v< Integer > > >
 
struct  Argument< Aapcs32Vfp, VarArgs< Types... > >
 
struct  Argument< Aapcs64, Composite, typename std::enable_if_t< IsAapcs64CompositeV< Composite > &&!IsAapcs64HxaV< Composite > > >
 
struct  Argument< Aapcs64, Float, typename std::enable_if_t< std::is_floating_point_v< Float >||IsAapcs64ShortVectorV< Float > > >
 
struct  Argument< Aapcs64, HA, typename std::enable_if_t< IsAapcs64HxaV< HA > > >
 
struct  Argument< Aapcs64, Integer, typename std::enable_if_t< std::is_integral_v< Integer > &&(sizeof(Integer) > 8)> >
 
struct  Argument< Aapcs64, Integer, typename std::enable_if_t< std::is_integral_v< Integer > &&(sizeof(Integer)<=8)> >
 
struct  Argument< ABI, Arg, typename std::enable_if_t< std::is_base_of_v< ArmISA::RegABI32, ABI > &&std::is_integral_v< Arg > &&ABI::template IsWideV< Arg > > >
 
struct  Argument< ABI, Arg, typename std::enable_if_t< std::is_base_of_v< GenericSyscallABI64, ABI > &&(std::is_integral_v< Arg >||std::is_same< Arg, pseudo_inst::GuestAddr >::value)> >
 
struct  Argument< ABI, Arg, typename std::enable_if_t< std::is_base_of_v< RiscvISA::RegABI32, ABI > &&std::is_integral_v< Arg > &&ABI::template IsWideV< Arg > > >
 
struct  Argument< ABI, Arg, typename std::enable_if_t< std::is_integral_v< Arg > &&!ABI::template IsWideV< Arg > > >
 
struct  Argument< Abi, ArmSemihosting::InPlaceArg, typename std::enable_if_t< std::is_base_of_v< ArmSemihosting::AbiBase, Abi > > >
 
struct  Argument< ABI, ConstProxyPtr< T, Proxy > >
 
struct  Argument< ABI, ProxyPtr< T, Proxy > >
 
struct  Argument< Abi, RiscvSemihosting::InPlaceArg, typename std::enable_if_t< std::is_base_of_v< RiscvSemihosting::AbiBase, Abi > > >
 
struct  Argument< ABI, VarArgs< Types... > >
 
struct  Argument< ArmISA::RegABI32, pseudo_inst::GuestAddr >
 
struct  Argument< ArmSemihosting::Abi32, Arg, typename std::enable_if_t<(std::is_integral_v< Arg >||std::is_same< Arg, pseudo_inst::GuestAddr >::value)> >
 
struct  Argument< ArmSemihosting::Abi64, Arg, typename std::enable_if_t<(std::is_integral_v< Arg >||std::is_same< Arg, pseudo_inst::GuestAddr >::value)> >
 
struct  Argument< RiscvISA::RegABI32, pseudo_inst::GuestAddr >
 
struct  Argument< RiscvSemihosting::Abi32, Arg, typename std::enable_if_t< std::is_integral_v< Arg > > >
 
struct  Argument< RiscvSemihosting::Abi64, Arg, typename std::enable_if_t< std::is_integral_v< Arg > > >
 
struct  Argument< SemiPseudoAbi32, T >
 
struct  Argument< SemiPseudoAbi64, T >
 
struct  Argument< SparcISA::SEWorkload::SyscallABI32, Arg, typename std::enable_if_t< std::is_integral_v< Arg > &&SparcISA::SEWorkload::SyscallABI32::IsWideV< Arg > > >
 
struct  Argument< SparcPseudoInstABI, pseudo_inst::GuestAddr >
 
struct  Argument< SparcPseudoInstABI, uint64_t >
 
struct  Argument< TestABI, Addr >
 
struct  Argument< TestABI_1D, Arg, typename std::enable_if_t< std::is_floating_point_v< Arg > > >
 
struct  Argument< TestABI_1D, int >
 
struct  Argument< TestABI_2D, Arg, typename std::enable_if_t< std::is_floating_point_v< Arg > > >
 
struct  Argument< TestABI_2D, int >
 
struct  Argument< TestABI_Prepare, int >
 
struct  Argument< TestABI_TcInit, int >
 
struct  Argument< X86ISA::EmuLinux::SyscallABI32, Arg, typename std::enable_if_t< std::is_integral_v< Arg > &&X86ISA::EmuLinux::SyscallABI32::IsWideV< Arg > > >
 
struct  Argument< X86PseudoInstABI, pseudo_inst::GuestAddr >
 
struct  Argument< X86PseudoInstABI, uint64_t >
 
struct  enable_if_t< IsAapcs64ShortVectorV< E > &&N<=4 > >
 
struct  enable_if_t< std::is_floating_point_v< E > &&N<=4 > >
 
struct  IsAapcs32Composite
 
struct  IsAapcs32Composite< T, typename std::enable_if_t<(std::is_array_v< T >||std::is_class_v< T >||std::is_union_v< T >) &&!IsVarArgsV< T > > >
 
struct  IsAapcs32HomogeneousAggregate
 
struct  IsAapcs32HomogeneousAggregate< E[N]>
 
struct  IsAapcs64Composite
 
struct  IsAapcs64Composite< T, typename std::enable_if_t<(std::is_array_v< T >||std::is_class_v< T >||std::is_union_v< T >) &&!IsVarArgsV< T > &&!IsAapcs64ShortVectorV< T > > >
 
struct  IsAapcs64Hfa
 
struct  IsAapcs64Hva
 
struct  IsAapcs64Hxa
 
struct  IsAapcs64Hxa< T, typename std::enable_if_t< IsAapcs64HfaV< T >||IsAapcs64HvaV< T > > >
 
struct  IsAapcs64ShortVector
 
struct  IsAapcs64ShortVector< E[N], typename std::enable_if_t<(std::is_integral_v< E >||std::is_floating_point_v< E >) &&(sizeof(E) *N==8||sizeof(E) *N==16)> >
 
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_t< IsAapcs32CompositeV< Composite > > >
 
struct  Result< Aapcs32, Float, typename std::enable_if_t< std::is_floating_point_v< Float > > >
 
struct  Result< Aapcs32, Integer, typename std::enable_if_t< std::is_integral_v< Integer > &&(sizeof(Integer)< sizeof(uint32_t))> >
 
struct  Result< Aapcs32, Integer, typename std::enable_if_t< std::is_integral_v< Integer > &&(sizeof(Integer)==sizeof(uint32_t))> >
 
struct  Result< Aapcs32, Integer, typename std::enable_if_t< std::is_integral_v< Integer > &&(sizeof(Integer)==sizeof(uint64_t))> >
 
struct  Result< Aapcs32Vfp, Composite, typename std::enable_if_t< IsAapcs32CompositeV< Composite > &&!IsAapcs32HomogeneousAggregateV< Composite > > >
 
struct  Result< Aapcs32Vfp, Float, typename std::enable_if_t< std::is_floating_point_v< Float > > >
 
struct  Result< Aapcs32Vfp, HA, typename std::enable_if_t< IsAapcs32HomogeneousAggregateV< HA > > >
 
struct  Result< Aapcs32Vfp, Integer, typename std::enable_if_t< std::is_integral_v< Integer > > >
 
struct  Result< Aapcs64, Composite, typename std::enable_if_t< IsAapcs64CompositeV< Composite > &&!IsAapcs64HxaV< Composite > > >
 
struct  Result< Aapcs64, Float, typename std::enable_if_t< std::is_floating_point_v< Float >||IsAapcs64ShortVectorV< Float > > >
 
struct  Result< Aapcs64, HA, typename std::enable_if_t< IsAapcs64HxaV< HA > > >
 
struct  Result< Aapcs64, Integer, typename std::enable_if_t< std::is_integral_v< Integer > &&(sizeof(Integer) > 8)> >
 
struct  Result< Aapcs64, Integer, typename std::enable_if_t< std::is_integral_v< Integer > &&(sizeof(Integer)<=8)> >
 
struct  Result< Abi, RiscvSemihosting::RetErrno >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if_t< std::is_base_of_v< ArmISA::EmuFreebsd::BaseSyscallABI, ABI > > >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if_t< std::is_base_of_v< ArmISA::EmuLinux::BaseSyscallABI, ABI > > >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if_t< std::is_base_of_v< SparcISA::SEWorkload::BaseSyscallABI, ABI > > >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if_t< std::is_base_of_v< X86Linux::SyscallABI, ABI > > >
 
struct  Result< ABI, void >
 
struct  Result< ArmSemihosting::Abi32, ArmSemihosting::RetErrno >
 
struct  Result< ArmSemihosting::Abi64, ArmSemihosting::RetErrno >
 
struct  Result< MipsISA::SEWorkload::SyscallABI, SyscallReturn >
 
struct  Result< PowerISA::SEWorkload::SyscallABI, SyscallReturn >
 
struct  Result< RiscvISA::SEWorkload::SyscallABI32, SyscallReturn >
 
struct  Result< RiscvISA::SEWorkload::SyscallABI64, SyscallReturn >
 
struct  Result< SparcPseudoInstABI, T >
 
struct  Result< TestABI_1D, int >
 
struct  Result< TestABI_1D, Ret, typename std::enable_if_t< std::is_floating_point_v< Ret > > >
 
struct  Result< TestABI_2D, int >
 
struct  Result< TestABI_2D, Ret, typename std::enable_if_t< std::is_floating_point_v< Ret > > >
 
struct  Result< TestABI_Prepare, Ret >
 
struct  Result< X86PseudoInstABI, T >
 
struct  ResultStorer
 
struct  ResultStorer< ABI, Ret, typename std::enable_if_t< std::is_same_v< void(*)(ThreadContext *, const Ret &, typename ABI::State &), decltype(&Result< ABI, Ret >::store)> > >
 
struct  StateInitializer
 
struct  StateInitializer< ABI, typename std::enable_if_t< std::is_constructible_v< typename ABI::State, const ThreadContext * > > >
 
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

template<typename ABI , typename Ret , bool store_ret, typename Target , typename State , typename Args , std::size_t... I>
static std::enable_if_t<!store_ret, Ret > callFromHelper (Target &target, ThreadContext *tc, State &state, Args &&args, std::index_sequence< I... >)
 
template<typename ABI , typename Ret , bool store_ret, typename Target , typename State , typename Args , std::size_t... I>
static std::enable_if_t< store_ret, Ret > callFromHelper (Target &target, ThreadContext *tc, State &state, Args &&args, std::index_sequence< I... >)
 
template<typename ABI , typename Ret , bool store_ret, typename ... Args>
static Ret callFrom (ThreadContext *tc, typename ABI::State &state, std::function< Ret(ThreadContext *, Args...)> target)
 
template<typename ABI , typename Ret , typename ... Args>
static void dumpArgsFrom (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 , 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 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 T >
constexpr bool IsAapcs32CompositeV = IsAapcs32Composite<T>::value
 
template<typename T >
constexpr bool IsAapcs32HomogeneousAggregateV
 
template<typename T >
constexpr bool IsAapcs64ShortVectorV = IsAapcs64ShortVector<T>::value
 
template<typename T >
constexpr bool IsAapcs64CompositeV = IsAapcs64Composite<T>::value
 
template<typename T >
constexpr bool IsAapcs64HfaV = IsAapcs64Hfa<T>::value
 
template<typename T >
constexpr bool IsAapcs64HvaV = IsAapcs64Hva<T>::value
 
template<typename T >
constexpr bool IsAapcs64HxaV = IsAapcs64Hxa<T>::value
 
template<typename T >
constexpr bool IsVarArgsV = IsVarArgs<T>::value
 

Typedef Documentation

◆ Aapcs32HomogeneousAggregate

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

Definition at line 100 of file aapcs32.hh.

Function Documentation

◆ callFrom()

template<typename ABI , typename Ret , bool store_ret, typename ... Args>
static Ret gem5::guest_abi::callFrom ( ThreadContext * tc,
typename ABI::State & state,
std::function< Ret(ThreadContext *, Args...)> target )
inlinestatic

Definition at line 81 of file dispatch.hh.

References callFromHelper(), getArgument(), and state.

Referenced by gem5::invokeSimcall(), and gem5::invokeSimcall().

◆ callFromHelper() [1/2]

template<typename ABI , typename Ret , bool store_ret, typename Target , typename State , typename Args , std::size_t... I>
static std::enable_if_t<!store_ret, Ret > gem5::guest_abi::callFromHelper ( Target & target,
ThreadContext * tc,
State & state,
Args && args,
std::index_sequence< I... >  )
inlinestatic

Definition at line 62 of file dispatch.hh.

Referenced by callFrom().

◆ callFromHelper() [2/2]

template<typename ABI , typename Ret , bool store_ret, typename Target , typename State , typename Args , std::size_t... I>
static std::enable_if_t< store_ret, Ret > gem5::guest_abi::callFromHelper ( Target & target,
ThreadContext * tc,
State & state,
Args && args,
std::index_sequence< I... >  )
inlinestatic

Definition at line 71 of file dispatch.hh.

References state, and storeResult().

◆ dumpArgsFrom()

template<typename ABI , typename Ret , typename ... Args>
static void gem5::guest_abi::dumpArgsFrom ( std::ostream & os,
ThreadContext * tc,
typename ABI::State & state )
static

Definition at line 102 of file dispatch.hh.

References gem5::X86ISA::count, getArgument(), gem5::X86ISA::os, and state.

Referenced by gem5::dumpSimcall().

◆ getArgument()

◆ initializeState()

template<typename ABI >
static ABI::State gem5::guest_abi::initializeState ( const ThreadContext * tc)
static

◆ operator<<()

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

Definition at line 182 of file varargs.hh.

References gem5::X86ISA::os.

◆ prepareForArguments()

template<typename ABI , typename ... Args>
static void gem5::guest_abi::prepareForArguments ( ThreadContext * tc,
typename ABI::State & state )
inlinestatic

Definition at line 115 of file layout.hh.

References state.

Referenced by gem5::invokeSimcall(), and prepareForFunction().

◆ prepareForFunction()

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

Definition at line 123 of file layout.hh.

References prepareForArguments(), prepareForResult(), and state.

Referenced by gem5::dumpSimcall(), and gem5::invokeSimcall().

◆ prepareForResult()

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

◆ storeResult()

Variable Documentation

◆ IsAapcs32CompositeV

template<typename T >
bool gem5::guest_abi::IsAapcs32CompositeV = IsAapcs32Composite<T>::value
constexpr

Definition at line 92 of file aapcs32.hh.

◆ IsAapcs32HomogeneousAggregateV

template<typename T >
bool gem5::guest_abi::IsAapcs32HomogeneousAggregateV
constexpr
Initial value:
=
IsAapcs32HomogeneousAggregate<T>::value

Definition at line 109 of file aapcs32.hh.

◆ IsAapcs64CompositeV

template<typename T >
bool gem5::guest_abi::IsAapcs64CompositeV = IsAapcs64Composite<T>::value
constexpr

Definition at line 113 of file aapcs64.hh.

◆ IsAapcs64HfaV

template<typename T >
bool gem5::guest_abi::IsAapcs64HfaV = IsAapcs64Hfa<T>::value
constexpr

Definition at line 134 of file aapcs64.hh.

Referenced by TEST().

◆ IsAapcs64HvaV

template<typename T >
bool gem5::guest_abi::IsAapcs64HvaV = IsAapcs64Hva<T>::value
constexpr

Definition at line 150 of file aapcs64.hh.

Referenced by TEST().

◆ IsAapcs64HxaV

template<typename T >
bool gem5::guest_abi::IsAapcs64HxaV = IsAapcs64Hxa<T>::value
constexpr

Definition at line 163 of file aapcs64.hh.

Referenced by TEST().

◆ IsAapcs64ShortVectorV

template<typename T >
bool gem5::guest_abi::IsAapcs64ShortVectorV = IsAapcs64ShortVector<T>::value
constexpr

Definition at line 93 of file aapcs64.hh.

Referenced by TEST().

◆ IsVarArgsV

template<typename T >
bool gem5::guest_abi::IsVarArgsV = IsVarArgs<T>::value
constexpr

Definition at line 179 of file varargs.hh.

Referenced by TEST().


Generated on Tue Jun 18 2024 16:24:19 for gem5 by doxygen 1.11.0