gem5  v21.1.0.2
Classes | Typedefs | Functions | Variables
gem5::guest_abi 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_t< IsAapcs32Composite< Composite >::value > >
 
struct  Argument< Aapcs32, Float, typename std::enable_if_t< std::is_floating_point< Float >::value > >
 
struct  Argument< Aapcs32Vfp, Composite, typename std::enable_if_t< IsAapcs32Composite< Composite >::value &&!IsAapcs32HomogeneousAggregate< Composite >::value > >
 
struct  Argument< Aapcs32Vfp, Float, typename std::enable_if_t< std::is_floating_point< Float >::value > >
 
struct  Argument< Aapcs32Vfp, HA, typename std::enable_if_t< IsAapcs32HomogeneousAggregate< HA >::value > >
 
struct  Argument< Aapcs32Vfp, Integer, typename std::enable_if_t< std::is_integral< Integer >::value > >
 
struct  Argument< Aapcs32Vfp, VarArgs< Types... > >
 
struct  Argument< Aapcs64, Composite, typename std::enable_if_t< IsAapcs64Composite< Composite >::value &&!IsAapcs64Hxa< Composite >::value > >
 
struct  Argument< Aapcs64, HA, typename std::enable_if_t< IsAapcs64Hxa< HA >::value > >
 
struct  Argument< ABI, Arg, typename std::enable_if_t< std::is_base_of< ArmISA::RegABI32, ABI >::value &&std::is_integral< Arg >::value &&ABI::template IsWide< Arg >::value > >
 
struct  Argument< ABI, Arg, typename std::enable_if_t< std::is_base_of< GenericSyscallABI64, ABI >::value &&std::is_integral< Arg >::value > >
 
struct  Argument< ABI, Arg, typename std::enable_if_t< std::is_integral< Arg >::value &&!ABI::template IsWide< Arg >::value > >
 
struct  Argument< Abi, ArmSemihosting::InPlaceArg, typename std::enable_if_t< std::is_base_of< ArmSemihosting::AbiBase, Abi >::value > >
 
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_t< std::is_integral< Arg >::value > >
 
struct  Argument< ArmSemihosting::Abi64, Arg, typename std::enable_if_t< std::is_integral< Arg >::value > >
 
struct  Argument< SemiPseudoAbi32, T >
 
struct  Argument< SemiPseudoAbi64, T >
 
struct  Argument< SparcISA::SEWorkload::SyscallABI32, Arg, typename std::enable_if_t< std::is_integral< Arg >::value &&SparcISA::SEWorkload::SyscallABI32::IsWide< Arg >::value > >
 
struct  Argument< SparcPseudoInstABI, uint64_t >
 
struct  Argument< TestABI, Addr >
 
struct  Argument< TestABI_1D, Arg, typename std::enable_if_t< std::is_floating_point< Arg >::value > >
 
struct  Argument< TestABI_1D, int >
 
struct  Argument< TestABI_2D, Arg, typename std::enable_if_t< std::is_floating_point< Arg >::value > >
 
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< Arg >::value &&X86ISA::EmuLinux::SyscallABI32::IsWide< Arg >::value > >
 
struct  Argument< X86PseudoInstABI, uint64_t >
 
struct  enable_if_t< std::is_integral< Integer >::value &&(sizeof(Integer)< sizeof(uint32_t))> >
 
struct  enable_if_t< std::is_integral< Integer >::value &&(sizeof(Integer)<=8)> >
 
struct  enable_if_t< std::is_integral< Integer >::value &&(sizeof(Integer)<=8)> >
 
struct  enable_if_t< std::is_integral< Integer >::value &&(sizeof(Integer)<=sizeof(uint32_t)) > >
 
struct  IsAapcs32Composite
 
struct  IsAapcs32Composite< T, typename std::enable_if_t<(std::is_array< T >::value||std::is_class< T >::value||std::is_union< T >::value) &&!IsVarArgs< T >::value > >
 
struct  IsAapcs32HomogeneousAggregate
 
struct  IsAapcs32HomogeneousAggregate< E[N]>
 
struct  IsAapcs64Composite
 
struct  IsAapcs64Composite< T, typename std::enable_if_t<(std::is_array< T >::value||std::is_class< T >::value||std::is_union< T >::value) &&!IsVarArgs< T >::value &&!IsAapcs64ShortVector< T >::value > >
 
struct  IsAapcs64Hfa
 
struct  IsAapcs64ShortVector
 
struct  IsAapcs64ShortVector< E[N], typename std::enable_if_t<(std::is_integral< E >::value||std::is_floating_point< E >::value) &&(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< IsAapcs32Composite< Composite >::value > >
 
struct  Result< Aapcs32, Float, typename std::enable_if_t< std::is_floating_point< Float >::value > >
 
struct  Result< Aapcs32, Integer, typename std::enable_if_t< std::is_integral< Integer >::value &&(sizeof(Integer)==sizeof(uint32_t))> >
 
struct  Result< Aapcs32, Integer, typename std::enable_if_t< std::is_integral< Integer >::value &&(sizeof(Integer)==sizeof(uint64_t))> >
 
struct  Result< Aapcs32Vfp, Composite, typename std::enable_if_t< IsAapcs32Composite< Composite >::value &&!IsAapcs32HomogeneousAggregate< Composite >::value > >
 
struct  Result< Aapcs32Vfp, Float, typename std::enable_if_t< std::is_floating_point< Float >::value > >
 
struct  Result< Aapcs32Vfp, HA, typename std::enable_if_t< IsAapcs32HomogeneousAggregate< HA >::value > >
 
struct  Result< Aapcs32Vfp, Integer, typename std::enable_if_t< std::is_integral< Integer >::value > >
 
struct  Result< Aapcs64, Composite, typename std::enable_if_t< IsAapcs64Composite< Composite >::value &&!IsAapcs64Hxa< Composite >::value > >
 
struct  Result< Aapcs64, HA, typename std::enable_if_t< IsAapcs64Hxa< HA >::value > >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if_t< std::is_base_of< ArmISA::EmuFreebsd::BaseSyscallABI, ABI >::value > >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if_t< std::is_base_of< ArmISA::EmuLinux::BaseSyscallABI, ABI >::value > >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if_t< std::is_base_of< SparcISA::SEWorkload::BaseSyscallABI, ABI >::value > >
 
struct  Result< ABI, SyscallReturn, typename std::enable_if_t< std::is_base_of< X86Linux::SyscallABI, ABI >::value > >
 
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::SyscallABI, SyscallReturn >
 
struct  Result< SparcPseudoInstABI, T >
 
struct  Result< TestABI_1D, int >
 
struct  Result< TestABI_1D, Ret, typename std::enable_if_t< std::is_floating_point< Ret >::value > >
 
struct  Result< TestABI_2D, int >
 
struct  Result< TestABI_2D, Ret, typename std::enable_if_t< std::is_floating_point< Ret >::value > >
 
struct  Result< TestABI_Prepare, Ret >
 
struct  Result< X86PseudoInstABI, T >
 
struct  ResultStorer
 
struct  ResultStorer< ABI, Ret, typename std::enable_if_t< std::is_same< void(*)(ThreadContext *, const Ret &, typename ABI::State &), decltype(&Result< ABI, Ret >::store)>::value > >
 
struct  StateInitializer
 
struct  StateInitializer< ABI, typename std::enable_if_t< std::is_constructible< typename ABI::State, const ThreadContext * >::value > >
 
struct  value &&(sizeof(Integer) > 8)> >
 
struct  value &&(sizeof(Integer) > 8)> >
 
struct  value &&(sizeof(Integer) > sizeof(uint32_t)) > >
 
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 as< Float > ()[0]
 
tc setVecReg (id, reg)
 
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, GEM5_VAR_USED 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 (GEM5_VAR_USED 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 E , size_t N>
struct IsAapcs64Hfa< E[N], typename std::enable_if_t< std::is_floating_point< E >::value &&N<=4 > > :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_t< IsAapcs64ShortVector< E >::value &&N<=4 > > :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_t< IsAapcs64Hfa< T >::value||IsAapcs64Hva< T >::value > > :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_t< std::is_floating_point< Float >::value||IsAapcs64ShortVector< Float >::value > > :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).as< Float >()[0];} return loadFromStack< Float >(tc, state);}};template< typename Float >struct Result< Aapcs64, Float, typename std::enable_if_t< std::is_floating_point< Float >::value||IsAapcs64ShortVector< Float >::value > >{ 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 gem5::guest_abi::Aapcs32HomogeneousAggregate = typedef T[count]

Definition at line 96 of file aapcs32.hh.

Function Documentation

◆ as< Float >()

reg gem5::guest_abi::as< Float > ( )

◆ 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 82 of file dispatch.hh.

Referenced by 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 63 of file dispatch.hh.

◆ 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 72 of file dispatch.hh.

◆ dumpArgsFrom()

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

Definition at line 103 of file dispatch.hh.

References gem5::X86ISA::count, and gem5::X86ISA::os.

Referenced by gem5::dumpSimcall().

◆ getArgument()

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

◆ 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 181 of file varargs.hh.

References gem5::X86ISA::os.

◆ prepareForArguments()

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

Definition at line 116 of file layout.hh.

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 124 of file layout.hh.

References prepareForArguments().

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

◆ setVecReg()

tc gem5::guest_abi::setVecReg ( id  ,
reg   
)

◆ storeResult()

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

Variable Documentation

◆ readVecReg

template<typename E , size_t N>
struct IsAapcs64Hfa< E[N], typename std::enable_if_t< std::is_floating_point< E >::value &&N<=4 > > : 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_t< IsAapcs64ShortVector< E >::value &&N<=4 > > : 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_t< IsAapcs64Hfa< T >::value||IsAapcs64Hva< T >::value > > : 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_t< std::is_floating_point< Float >::value|| IsAapcs64ShortVector< Float >::value > > : 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).as< Float >()[0]; } return loadFromStack< Float >(tc, state); }};template< typename Float >struct Result< Aapcs64, Float, typename std::enable_if_t< std::is_floating_point< Float >::value|| IsAapcs64ShortVector< Float >::value > >{ static void store(ThreadContext *tc, const Float &f) { RegId id(VecRegClass, 0); auto reg=tc-> gem5::guest_abi::readVecReg(id)

Definition at line 209 of file aapcs64.hh.


Generated on Tue Sep 21 2021 12:31:21 for gem5 by doxygen 1.8.17