arch,sim: Rename GuestABI namespace as guest_abi

As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::GuestABI became ::guest_abi.

Change-Id: I68700ef63479f1bb3eeab044b29dc09d86424608
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45433
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Daniel R. Carvalho
2021-05-07 14:52:15 -03:00
committed by Daniel Carvalho
parent b8ff106024
commit 0c8bd5013a
29 changed files with 151 additions and 124 deletions

View File

@@ -63,7 +63,8 @@ struct Aapcs32
};
};
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
/*
@@ -355,7 +356,7 @@ struct Argument<Aapcs32, Composite, typename std::enable_if_t<
}
};
} // namespace GuestABI
} // namespace guest_abi
/*
@@ -426,7 +427,8 @@ struct Aapcs32Vfp : public Aapcs32
};
};
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
/*
@@ -634,6 +636,6 @@ struct Argument<Aapcs32Vfp, VarArgs<Types...>>
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_ARM_AAPCS32_HH__

View File

@@ -63,7 +63,8 @@ struct Aapcs64
};
};
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
/*
@@ -420,6 +421,6 @@ struct Result<Aapcs64, Composite, typename std::enable_if_t<
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_ARM_AAPCS64_HH__

View File

@@ -40,41 +40,41 @@ TEST(Aapcs64, IsAapcs64ShortVector)
using EightLongFloat = float[2];
using SixteenLongFloat = double[2];
EXPECT_FALSE(GuestABI::IsAapcs64ShortVector<Scalar>::value);
EXPECT_FALSE(GuestABI::IsAapcs64ShortVector<TooShort>::value);
EXPECT_FALSE(GuestABI::IsAapcs64ShortVector<TooLong>::value);
EXPECT_FALSE(GuestABI::IsAapcs64ShortVector<TooLongFloat>::value);
EXPECT_FALSE(GuestABI::IsAapcs64ShortVector<void>::value);
EXPECT_FALSE(guest_abi::IsAapcs64ShortVector<Scalar>::value);
EXPECT_FALSE(guest_abi::IsAapcs64ShortVector<TooShort>::value);
EXPECT_FALSE(guest_abi::IsAapcs64ShortVector<TooLong>::value);
EXPECT_FALSE(guest_abi::IsAapcs64ShortVector<TooLongFloat>::value);
EXPECT_FALSE(guest_abi::IsAapcs64ShortVector<void>::value);
EXPECT_TRUE(GuestABI::IsAapcs64ShortVector<EightLong>::value);
EXPECT_TRUE(GuestABI::IsAapcs64ShortVector<SixteenLong>::value);
EXPECT_TRUE(GuestABI::IsAapcs64ShortVector<EightLongFloat>::value);
EXPECT_TRUE(GuestABI::IsAapcs64ShortVector<SixteenLongFloat>::value);
EXPECT_TRUE(guest_abi::IsAapcs64ShortVector<EightLong>::value);
EXPECT_TRUE(guest_abi::IsAapcs64ShortVector<SixteenLong>::value);
EXPECT_TRUE(guest_abi::IsAapcs64ShortVector<EightLongFloat>::value);
EXPECT_TRUE(guest_abi::IsAapcs64ShortVector<SixteenLongFloat>::value);
}
TEST(Aapcs64, IsAapcs64Hfa)
{
// Accept floating point arrays with up to 4 members.
EXPECT_TRUE(GuestABI::IsAapcs64Hfa<float[1]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hfa<float[2]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hfa<float[3]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hfa<float[4]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hfa<float[1]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hfa<float[2]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hfa<float[3]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hfa<float[4]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hfa<double[1]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hfa<double[2]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hfa<double[3]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hfa<double[4]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hfa<double[1]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hfa<double[2]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hfa<double[3]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hfa<double[4]>::value);
// Too many members.
EXPECT_FALSE(GuestABI::IsAapcs64Hfa<float[5]>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hfa<double[5]>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hfa<float[5]>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hfa<double[5]>::value);
// Wrong type of members, or not arrays.
EXPECT_FALSE(GuestABI::IsAapcs64Hfa<int32_t[3]>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hfa<float>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hfa<int32_t[3]>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hfa<float>::value);
struct Struct {};
EXPECT_FALSE(GuestABI::IsAapcs64Hfa<Struct>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hfa<void>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hfa<Struct>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hfa<void>::value);
}
TEST(Aapcs64, IsAapcs64Hva)
@@ -83,36 +83,36 @@ TEST(Aapcs64, IsAapcs64Hva)
using SvaTiny = uint8_t[16];
using SvaFloat = float[2];
EXPECT_TRUE(GuestABI::IsAapcs64Hva<SvaInt[3]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hva<SvaInt[4]>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hva<SvaInt[5]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hva<SvaInt[3]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hva<SvaInt[4]>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hva<SvaInt[5]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hva<SvaFloat[3]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hva<SvaFloat[4]>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hva<SvaFloat[5]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hva<SvaFloat[3]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hva<SvaFloat[4]>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hva<SvaFloat[5]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hva<SvaTiny[3]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hva<SvaTiny[4]>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hva<SvaTiny[5]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hva<SvaTiny[3]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hva<SvaTiny[4]>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hva<SvaTiny[5]>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hva<uint64_t>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hva<uint64_t[1]>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hva<SvaTiny>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hva<void>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hva<float>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hva<uint64_t>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hva<uint64_t[1]>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hva<SvaTiny>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hva<void>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hva<float>::value);
}
TEST(Aapcs64, IsAapcs64Hxa)
{
using SvaInt = uint32_t[2];
EXPECT_TRUE(GuestABI::IsAapcs64Hxa<SvaInt[4]>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hxa<SvaInt[5]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hxa<SvaInt[4]>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hxa<SvaInt[5]>::value);
EXPECT_TRUE(GuestABI::IsAapcs64Hxa<float[4]>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hxa<float[5]>::value);
EXPECT_TRUE(guest_abi::IsAapcs64Hxa<float[4]>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hxa<float[5]>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hxa<SvaInt>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hxa<uint64_t>::value);
EXPECT_FALSE(GuestABI::IsAapcs64Hxa<void>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hxa<SvaInt>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hxa<uint64_t>::value);
EXPECT_FALSE(guest_abi::IsAapcs64Hxa<void>::value);
}

View File

@@ -64,7 +64,8 @@ class EmuFreebsd : public SEWorkload
} // namespace ArmISA
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <typename ABI>
@@ -92,6 +93,6 @@ struct Result<ABI, SyscallReturn,
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_ARM_FREEBSD_SE_WORKLOAD_HH__

View File

@@ -57,7 +57,8 @@ class EmuLinux : public SEWorkload
} // namespace ArmISA
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <typename ABI>
@@ -77,6 +78,6 @@ struct Result<ABI, SyscallReturn,
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_ARM_LINUX_SE_WORKLOAD_HH__

View File

@@ -48,7 +48,8 @@ struct RegABI64 : public GenericSyscallABI64
} // namespace ArmISA
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <typename ABI, typename Arg>
@@ -72,6 +73,6 @@ struct Argument<ABI, Arg,
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_ARM_REG_ABI_HH__

View File

@@ -702,7 +702,8 @@ struct SemiPseudoAbi64 : public ArmSemihosting::Abi64
};
};
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
// Handle arguments the same as for semihosting operations. Skipping the first
@@ -716,7 +717,7 @@ struct Argument<SemiPseudoAbi64, T> :
public Argument<ArmSemihosting::Abi64, T>
{};
} // namespace GuestABI
} // namespace guest_abi
ArmSemihosting::RetErrno
ArmSemihosting::callGem5PseudoOp32(ThreadContext *tc, uint32_t encoded_func)

View File

@@ -595,7 +595,8 @@ class ArmSemihosting : public SimObject
std::ostream &operator << (
std::ostream &os, const ArmSemihosting::InPlaceArg &ipa);
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <typename Arg>
@@ -655,6 +656,6 @@ struct Result<ArmSemihosting::Abi64, ArmSemihosting::RetErrno>
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_ARM_SEMIHOSTING_HH__

View File

@@ -54,7 +54,8 @@ class SEWorkload : public ::SEWorkload
} // namespace MipsISA
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <>
@@ -80,6 +81,6 @@ struct Result<MipsISA::SEWorkload::SyscallABI, SyscallReturn>
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_MIPS_SE_WORKLOAD_HH__

View File

@@ -54,7 +54,8 @@ class SEWorkload : public ::SEWorkload
} // namespace PowerISA
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <>
@@ -77,6 +78,6 @@ struct Result<PowerISA::SEWorkload::SyscallABI, SyscallReturn>
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_POWER_SE_WORKLOAD_HH__

View File

@@ -52,7 +52,8 @@ class SEWorkload : public ::SEWorkload
} // namespace RiscvISA
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <>
@@ -74,6 +75,6 @@ struct Result<RiscvISA::SEWorkload::SyscallABI, SyscallReturn>
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_RISCV_SE_WORKLOAD_HH__

View File

@@ -37,7 +37,8 @@ struct SparcPseudoInstABI
using State = int;
};
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <typename T>
@@ -64,6 +65,6 @@ struct Argument<SparcPseudoInstABI, uint64_t>
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_SPARC_PSEUDO_INST_ABI_HH__

View File

@@ -66,7 +66,8 @@ class SEWorkload : public ::SEWorkload
} // namespace SparcISA
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <typename ABI>
@@ -122,6 +123,6 @@ struct Argument<SparcISA::SEWorkload::SyscallABI32, Arg,
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_SPARC_SE_WORKLOAD_HH__

View File

@@ -69,7 +69,8 @@ class X86Linux : public Linux
class SyscallABI {};
};
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <typename ABI>
@@ -87,7 +88,7 @@ struct Result<ABI, SyscallReturn,
}
};
};
} // namespace guest_abi
class X86Linux64 : public X86Linux
{

View File

@@ -82,7 +82,8 @@ class EmuLinux : public SEWorkload
} // namespace X86ISA
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <typename Arg>
@@ -103,6 +104,6 @@ struct Argument<X86ISA::EmuLinux::SyscallABI32, Arg,
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __ARCH_X86_LINUX_SE_WORKLOAD_HH__

View File

@@ -43,7 +43,8 @@ struct X86PseudoInstABI
using State = int;
};
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <typename T>
@@ -81,4 +82,4 @@ struct Argument<X86PseudoInstABI, uint64_t>
}
};
} // namespace GuestABI
} // namespace guest_abi

View File

@@ -40,7 +40,7 @@ namespace linux
{
using PrintkVarArgs =
GuestABI::VarArgs<Addr, int32_t, uint32_t, int64_t, uint64_t>;
guest_abi::VarArgs<Addr, int32_t, uint32_t, int64_t, uint64_t>;
int printk(std::string &out, ThreadContext *tc, Addr format_ptr,
PrintkVarArgs args);

View File

@@ -49,9 +49,10 @@ invokeSimcall(ThreadContext *tc,
{
// Default construct a State to track consumed resources. Built in
// types will be zero initialized.
auto state = GuestABI::initializeState<ABI>(tc);
GuestABI::prepareForFunction<ABI, Ret, Args...>(tc, state);
return GuestABI::callFrom<ABI, Ret, store_ret, Args...>(tc, state, target);
auto state = guest_abi::initializeState<ABI>(tc);
guest_abi::prepareForFunction<ABI, Ret, Args...>(tc, state);
return guest_abi::callFrom<ABI, Ret, store_ret, Args...>(tc, state,
target);
}
template <typename ABI, typename Ret, typename ...Args>
@@ -84,9 +85,9 @@ invokeSimcall(ThreadContext *tc,
{
// Default construct a State to track consumed resources. Built in
// types will be zero initialized.
auto state = GuestABI::initializeState<ABI>(tc);
GuestABI::prepareForArguments<ABI, Args...>(tc, state);
GuestABI::callFrom<ABI, void, false, Args...>(tc, state, target);
auto state = guest_abi::initializeState<ABI>(tc);
guest_abi::prepareForArguments<ABI, Args...>(tc, state);
guest_abi::callFrom<ABI, void, false, Args...>(tc, state, target);
}
template <typename ABI, typename ...Args>
@@ -108,12 +109,12 @@ dumpSimcall(std::string name, ThreadContext *tc,
std::function<Ret(ThreadContext *, Args...)> target=
std::function<Ret(ThreadContext *, Args...)>())
{
auto state = GuestABI::initializeState<ABI>(tc);
auto state = guest_abi::initializeState<ABI>(tc);
std::ostringstream ss;
GuestABI::prepareForFunction<ABI, Ret, Args...>(tc, state);
guest_abi::prepareForFunction<ABI, Ret, Args...>(tc, state);
ss << name;
GuestABI::dumpArgsFrom<ABI, Ret, Args...>(ss, tc, state);
guest_abi::dumpArgsFrom<ABI, Ret, Args...>(ss, tc, state);
return ss.str();
}

View File

@@ -89,7 +89,8 @@ struct TestABI_TcInit
};
};
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
// Hooks for the 1D ABI arguments and return value. Add 1 or 1.0 to return
@@ -222,13 +223,13 @@ struct Argument<TestABI_TcInit, int>
}
};
} // namespace GuestABI
} // namespace guest_abi
// Test function which verifies that its arguments reflect the 1D ABI and
// which doesn't return anything.
void
testIntVoid(ThreadContext *tc, int a, float b, int c, double d,
GuestABI::VarArgs<int,float,double> varargs)
guest_abi::VarArgs<int,float,double> varargs)
{
EXPECT_EQ(a, tc->ints[0]);
EXPECT_EQ(b, tc->floats[1]);
@@ -261,7 +262,7 @@ testPrepareInt(ThreadContext *tc, int a, int b)
// which doesn't return anything.
void
test2DVoid(ThreadContext *tc, int a, float b, int c, double d,
GuestABI::VarArgs<int,float,double> varargs)
guest_abi::VarArgs<int,float,double> varargs)
{
EXPECT_EQ(a, tc->ints[0]);
EXPECT_EQ(b, tc->floats[0]);
@@ -291,7 +292,7 @@ double testDoubleRet(ThreadContext *tc) { return DoubleRetValue; }
// The actual test bodies.
TEST(GuestABI, ABI_1D_args)
TEST(guest_abi, ABI_1D_args)
{
ThreadContext tc;
invokeSimcall<TestABI_1D>(&tc, testIntVoid);
@@ -299,14 +300,14 @@ TEST(GuestABI, ABI_1D_args)
EXPECT_EQ(tc.floatResult, tc.DefaultFloatResult);
}
TEST(GuestABI, ABI_Prepare)
TEST(guest_abi, ABI_Prepare)
{
ThreadContext tc;
invokeSimcall<TestABI_Prepare>(&tc, testPrepareVoid);
invokeSimcall<TestABI_Prepare>(&tc, testPrepareInt);
}
TEST(GuestABI, ABI_2D_args)
TEST(guest_abi, ABI_2D_args)
{
ThreadContext tc;
invokeSimcall<TestABI_2D>(&tc, test2DVoid);
@@ -314,14 +315,14 @@ TEST(GuestABI, ABI_2D_args)
EXPECT_EQ(tc.floatResult, tc.DefaultFloatResult);
}
TEST(GuestABI, ABI_TC_init)
TEST(guest_abi, ABI_TC_init)
{
ThreadContext tc;
tc.intOffset = 2;
invokeSimcall<TestABI_TcInit>(&tc, testTcInit);
}
TEST(GuestABI, ABI_returns)
TEST(guest_abi, ABI_returns)
{
// 1D returns.
{
@@ -379,20 +380,20 @@ TEST(GuestABI, ABI_returns)
}
}
TEST(GuestABI, dumpSimcall)
TEST(guest_abi, dumpSimcall)
{
ThreadContext tc;
std::string dump = dumpSimcall<TestABI_1D>("test", &tc, testIntVoid);
EXPECT_EQ(dump, "test(0, 11, 2, 13, ...)");
}
TEST(GuestABI, isVarArgs)
TEST(guest_abi, isVarArgs)
{
EXPECT_TRUE(GuestABI::IsVarArgs<GuestABI::VarArgs<int>>::value);
EXPECT_FALSE(GuestABI::IsVarArgs<int>::value);
EXPECT_FALSE(GuestABI::IsVarArgs<double>::value);
EXPECT_TRUE(guest_abi::IsVarArgs<guest_abi::VarArgs<int>>::value);
EXPECT_FALSE(guest_abi::IsVarArgs<int>::value);
EXPECT_FALSE(guest_abi::IsVarArgs<double>::value);
struct FooStruct {};
EXPECT_FALSE(GuestABI::IsVarArgs<FooStruct>::value);
EXPECT_FALSE(guest_abi::IsVarArgs<FooStruct>::value);
union FooUnion {};
EXPECT_FALSE(GuestABI::IsVarArgs<FooUnion>::value);
EXPECT_FALSE(guest_abi::IsVarArgs<FooUnion>::value);
}

View File

@@ -28,9 +28,12 @@
#ifndef __SIM_GUEST_ABI_DEFINITION_HH__
#define __SIM_GUEST_ABI_DEFINITION_HH__
#include "base/compiler.hh"
class ThreadContext;
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
/*
@@ -113,6 +116,6 @@ struct Argument
*/
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __SIM_GUEST_ABI_DEFINITION_HH__

View File

@@ -40,7 +40,8 @@
class ThreadContext;
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
/*
@@ -107,6 +108,6 @@ dumpArgsFrom(std::ostream &os, GEM5_VAR_USED ThreadContext *tc,
os << ")";
}
} // namespace GuestABI
} // namespace guest_abi
#endif // __SIM_GUEST_ABI_DISPATCH_HH__

View File

@@ -35,7 +35,8 @@
class ThreadContext;
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
/*
@@ -168,6 +169,6 @@ getArgument(ThreadContext *tc, typename ABI::State &state)
return Argument<ABI, Arg>::get(tc, state);
}
} // namespace GuestABI
} // namespace guest_abi
#endif // __SIM_GUEST_ABI_LAYOUT_HH__

View File

@@ -36,7 +36,8 @@
class ThreadContext;
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
/*
@@ -180,7 +181,7 @@ operator << (std::ostream &os, const VarArgs<Types...> &va)
return os;
}
// The ABI independent hook which tells the GuestABI mechanism what to do with
// The ABI independent hook which tells the guest_abi mechanism what to do with
// a VarArgs argument. It constructs the underlying implementation which knows
// about the ABI, and installs it in the VarArgs wrapper to give to the
// function.
@@ -196,6 +197,6 @@ struct Argument<ABI, VarArgs<Types...>>
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __SIM_GUEST_ABI_VARARGS_HH__

View File

@@ -354,7 +354,8 @@ operator + (A a, const ProxyPtr<T, Proxy> &other)
return other + a;
}
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <typename ABI, typename T, typename Proxy>
@@ -379,7 +380,7 @@ struct Argument<ABI, ConstProxyPtr<T, Proxy>>
}
};
} // namespace GuestABI
} // namespace guest_abi
template <typename T, typename Proxy>
std::ostream &

View File

@@ -163,7 +163,7 @@ class TestProxy
BackingStore &store;
TestProxy(BackingStore &_store) : store(_store) {}
// Sneaky constructor for testing GuestABI integration.
// Sneaky constructor for testing guest_abi integration.
TestProxy(ThreadContext *tc) : store(*(BackingStore *)tc) {}
void
@@ -469,7 +469,8 @@ struct TestABI
using State = int;
};
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
template <>
@@ -482,7 +483,7 @@ struct Argument<TestABI, Addr>
}
};
}
} // namespace guest_abi
bool abiCalled = false;
bool abiCalledConst = false;
@@ -501,7 +502,7 @@ abiTestFuncConst(ThreadContext *tc, ConstTestPtr<uint8_t> ptr)
EXPECT_EQ(ptr.addr(), 0x1000);
}
TEST(ProxyPtr, GuestABI)
TEST(ProxyPtr, guest_abi)
{
BackingStore store(0x1000, 0x1000);

View File

@@ -69,7 +69,8 @@ struct GenericSyscallABI32 : public GenericSyscallABI
}
};
namespace GuestABI
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
namespace guest_abi
{
// For 64 bit systems, return syscall args directly.
@@ -104,6 +105,6 @@ struct Argument<ABI, Arg,
}
};
} // namespace GuestABI
} // namespace guest_abi
#endif // __SIM_SYSCALL_ABI_HH__

View File

@@ -105,7 +105,7 @@ class SyscallDesc
/*
* This SyscallDesc subclass template adapts a given syscall implementation so
* that some arguments can come from the simulator (desc, num and tc) while the
* rest can come from the guest using the GuestABI mechanism.
* rest can come from the guest using the guest_abi mechanism.
*/
template <typename ABI>
class SyscallDescABI : public SyscallDesc
@@ -173,7 +173,7 @@ class SyscallDescABI : public SyscallDesc
void
returnInto(ThreadContext *tc, const SyscallReturn &ret) override
{
GuestABI::Result<ABI, SyscallReturn>::store(tc, ret);
guest_abi::Result<ABI, SyscallReturn>::store(tc, ret);
}
};

View File

@@ -714,7 +714,7 @@ dup2Func(SyscallDesc *desc, ThreadContext *tc, int old_tgt_fd, int new_tgt_fd)
SyscallReturn
fcntlFunc(SyscallDesc *desc, ThreadContext *tc,
int tgt_fd, int cmd, GuestABI::VarArgs<int> varargs)
int tgt_fd, int cmd, guest_abi::VarArgs<int> varargs)
{
auto p = tc->getProcessPtr();

View File

@@ -267,7 +267,7 @@ SyscallReturn dup2Func(SyscallDesc *desc, ThreadContext *tc,
/// Target fcntl() handler.
SyscallReturn fcntlFunc(SyscallDesc *desc, ThreadContext *tc,
int tgt_fd, int cmd, GuestABI::VarArgs<int> varargs);
int tgt_fd, int cmd, guest_abi::VarArgs<int> varargs);
/// Target fcntl64() handler.
SyscallReturn fcntl64Func(SyscallDesc *desc, ThreadContext *tc,
@@ -1092,7 +1092,7 @@ template <class OS>
SyscallReturn
mremapFunc(SyscallDesc *desc, ThreadContext *tc,
VPtr<> start, uint64_t old_length, uint64_t new_length, uint64_t flags,
GuestABI::VarArgs<uint64_t> varargs)
guest_abi::VarArgs<uint64_t> varargs)
{
auto p = tc->getProcessPtr();
Addr page_bytes = p->pTable->pageSize();