From 0c8bd5013aa6abefdcde405af17e590fefe72c15 Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Fri, 7 May 2021 14:52:15 -0300 Subject: [PATCH] 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45433 Tested-by: kokoro Reviewed-by: Hoa Nguyen Maintainer: Gabe Black --- src/arch/arm/aapcs32.hh | 10 ++-- src/arch/arm/aapcs64.hh | 5 +- src/arch/arm/aapcs64.test.cc | 88 ++++++++++++++--------------- src/arch/arm/freebsd/se_workload.hh | 5 +- src/arch/arm/linux/se_workload.hh | 5 +- src/arch/arm/reg_abi.hh | 5 +- src/arch/arm/semihosting.cc | 5 +- src/arch/arm/semihosting.hh | 5 +- src/arch/mips/se_workload.hh | 5 +- src/arch/power/se_workload.hh | 5 +- src/arch/riscv/se_workload.hh | 5 +- src/arch/sparc/pseudo_inst_abi.hh | 5 +- src/arch/sparc/se_workload.hh | 5 +- src/arch/x86/linux/linux.hh | 5 +- src/arch/x86/linux/se_workload.hh | 5 +- src/arch/x86/pseudo_inst_abi.hh | 5 +- src/kern/linux/printk.hh | 2 +- src/sim/guest_abi.hh | 19 ++++--- src/sim/guest_abi.test.cc | 33 +++++------ src/sim/guest_abi/definition.hh | 7 ++- src/sim/guest_abi/dispatch.hh | 5 +- src/sim/guest_abi/layout.hh | 5 +- src/sim/guest_abi/varargs.hh | 7 ++- src/sim/proxy_ptr.hh | 5 +- src/sim/proxy_ptr.test.cc | 9 +-- src/sim/syscall_abi.hh | 5 +- src/sim/syscall_desc.hh | 4 +- src/sim/syscall_emul.cc | 2 +- src/sim/syscall_emul.hh | 4 +- 29 files changed, 151 insertions(+), 124 deletions(-) diff --git a/src/arch/arm/aapcs32.hh b/src/arch/arm/aapcs32.hh index e1bd5054d8..6302a6a7a2 100644 --- a/src/arch/arm/aapcs32.hh +++ b/src/arch/arm/aapcs32.hh @@ -63,7 +63,8 @@ struct Aapcs32 }; }; -namespace GuestABI +GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi); +namespace guest_abi { /* @@ -355,7 +356,7 @@ struct Argument> } }; -} // namespace GuestABI +} // namespace guest_abi #endif // __ARCH_ARM_AAPCS32_HH__ diff --git a/src/arch/arm/aapcs64.hh b/src/arch/arm/aapcs64.hh index 3f07105418..55e24d85d5 100644 --- a/src/arch/arm/aapcs64.hh +++ b/src/arch/arm/aapcs64.hh @@ -63,7 +63,8 @@ struct Aapcs64 }; }; -namespace GuestABI +GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi); +namespace guest_abi { /* @@ -420,6 +421,6 @@ struct Result::value); - EXPECT_FALSE(GuestABI::IsAapcs64ShortVector::value); - EXPECT_FALSE(GuestABI::IsAapcs64ShortVector::value); - EXPECT_FALSE(GuestABI::IsAapcs64ShortVector::value); - EXPECT_FALSE(GuestABI::IsAapcs64ShortVector::value); + EXPECT_FALSE(guest_abi::IsAapcs64ShortVector::value); + EXPECT_FALSE(guest_abi::IsAapcs64ShortVector::value); + EXPECT_FALSE(guest_abi::IsAapcs64ShortVector::value); + EXPECT_FALSE(guest_abi::IsAapcs64ShortVector::value); + EXPECT_FALSE(guest_abi::IsAapcs64ShortVector::value); - EXPECT_TRUE(GuestABI::IsAapcs64ShortVector::value); - EXPECT_TRUE(GuestABI::IsAapcs64ShortVector::value); - EXPECT_TRUE(GuestABI::IsAapcs64ShortVector::value); - EXPECT_TRUE(GuestABI::IsAapcs64ShortVector::value); + EXPECT_TRUE(guest_abi::IsAapcs64ShortVector::value); + EXPECT_TRUE(guest_abi::IsAapcs64ShortVector::value); + EXPECT_TRUE(guest_abi::IsAapcs64ShortVector::value); + EXPECT_TRUE(guest_abi::IsAapcs64ShortVector::value); } TEST(Aapcs64, IsAapcs64Hfa) { // Accept floating point arrays with up to 4 members. - EXPECT_TRUE(GuestABI::IsAapcs64Hfa::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hfa::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hfa::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hfa::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hfa::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hfa::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hfa::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hfa::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hfa::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hfa::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hfa::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hfa::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hfa::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hfa::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hfa::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hfa::value); // Too many members. - EXPECT_FALSE(GuestABI::IsAapcs64Hfa::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hfa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hfa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hfa::value); // Wrong type of members, or not arrays. - EXPECT_FALSE(GuestABI::IsAapcs64Hfa::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hfa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hfa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hfa::value); struct Struct {}; - EXPECT_FALSE(GuestABI::IsAapcs64Hfa::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hfa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hfa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hfa::value); } TEST(Aapcs64, IsAapcs64Hva) @@ -83,36 +83,36 @@ TEST(Aapcs64, IsAapcs64Hva) using SvaTiny = uint8_t[16]; using SvaFloat = float[2]; - EXPECT_TRUE(GuestABI::IsAapcs64Hva::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hva::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hva::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hva::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hva::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hva::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hva::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hva::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hva::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hva::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hva::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hva::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hva::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hva::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hva::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hva::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hva::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hva::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hva::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hva::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hva::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hva::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hva::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hva::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hva::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hva::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hva::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hva::value); } TEST(Aapcs64, IsAapcs64Hxa) { using SvaInt = uint32_t[2]; - EXPECT_TRUE(GuestABI::IsAapcs64Hxa::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hxa::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hxa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hxa::value); - EXPECT_TRUE(GuestABI::IsAapcs64Hxa::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hxa::value); + EXPECT_TRUE(guest_abi::IsAapcs64Hxa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hxa::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hxa::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hxa::value); - EXPECT_FALSE(GuestABI::IsAapcs64Hxa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hxa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hxa::value); + EXPECT_FALSE(guest_abi::IsAapcs64Hxa::value); } diff --git a/src/arch/arm/freebsd/se_workload.hh b/src/arch/arm/freebsd/se_workload.hh index 3690bb9162..f2bfaf3571 100644 --- a/src/arch/arm/freebsd/se_workload.hh +++ b/src/arch/arm/freebsd/se_workload.hh @@ -64,7 +64,8 @@ class EmuFreebsd : public SEWorkload } // namespace ArmISA -namespace GuestABI +GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi); +namespace guest_abi { template @@ -92,6 +93,6 @@ struct Result @@ -77,6 +78,6 @@ struct Result @@ -72,6 +73,6 @@ struct Argument : public Argument {}; -} // namespace GuestABI +} // namespace guest_abi ArmSemihosting::RetErrno ArmSemihosting::callGem5PseudoOp32(ThreadContext *tc, uint32_t encoded_func) diff --git a/src/arch/arm/semihosting.hh b/src/arch/arm/semihosting.hh index d195d91721..6a38a98b2e 100644 --- a/src/arch/arm/semihosting.hh +++ b/src/arch/arm/semihosting.hh @@ -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 @@ -655,6 +656,6 @@ struct Result } }; -} // namespace GuestABI +} // namespace guest_abi #endif // __ARCH_ARM_SEMIHOSTING_HH__ diff --git a/src/arch/mips/se_workload.hh b/src/arch/mips/se_workload.hh index 63eba3cebc..7e17221767 100644 --- a/src/arch/mips/se_workload.hh +++ b/src/arch/mips/se_workload.hh @@ -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 } }; -} // namespace GuestABI +} // namespace guest_abi #endif // __ARCH_MIPS_SE_WORKLOAD_HH__ diff --git a/src/arch/power/se_workload.hh b/src/arch/power/se_workload.hh index ac791519ab..12cc994403 100644 --- a/src/arch/power/se_workload.hh +++ b/src/arch/power/se_workload.hh @@ -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 } }; -} // namespace GuestABI +} // namespace guest_abi #endif // __ARCH_POWER_SE_WORKLOAD_HH__ diff --git a/src/arch/riscv/se_workload.hh b/src/arch/riscv/se_workload.hh index 1f6bd201ad..248f90b288 100644 --- a/src/arch/riscv/se_workload.hh +++ b/src/arch/riscv/se_workload.hh @@ -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 } }; -} // namespace GuestABI +} // namespace guest_abi #endif // __ARCH_RISCV_SE_WORKLOAD_HH__ diff --git a/src/arch/sparc/pseudo_inst_abi.hh b/src/arch/sparc/pseudo_inst_abi.hh index 95bc4606ed..2bcbef2e22 100644 --- a/src/arch/sparc/pseudo_inst_abi.hh +++ b/src/arch/sparc/pseudo_inst_abi.hh @@ -37,7 +37,8 @@ struct SparcPseudoInstABI using State = int; }; -namespace GuestABI +GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi); +namespace guest_abi { template @@ -64,6 +65,6 @@ struct Argument } }; -} // namespace GuestABI +} // namespace guest_abi #endif // __ARCH_SPARC_PSEUDO_INST_ABI_HH__ diff --git a/src/arch/sparc/se_workload.hh b/src/arch/sparc/se_workload.hh index 0ad572a14f..13155e8c76 100644 --- a/src/arch/sparc/se_workload.hh +++ b/src/arch/sparc/se_workload.hh @@ -66,7 +66,8 @@ class SEWorkload : public ::SEWorkload } // namespace SparcISA -namespace GuestABI +GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi); +namespace guest_abi { template @@ -122,6 +123,6 @@ struct Argument @@ -87,7 +88,7 @@ struct Result @@ -103,6 +104,6 @@ struct Argument @@ -81,4 +82,4 @@ struct Argument } }; -} // namespace GuestABI +} // namespace guest_abi diff --git a/src/kern/linux/printk.hh b/src/kern/linux/printk.hh index 536031ffc3..de3cbc9060 100644 --- a/src/kern/linux/printk.hh +++ b/src/kern/linux/printk.hh @@ -40,7 +40,7 @@ namespace linux { using PrintkVarArgs = - GuestABI::VarArgs; + guest_abi::VarArgs; int printk(std::string &out, ThreadContext *tc, Addr format_ptr, PrintkVarArgs args); diff --git a/src/sim/guest_abi.hh b/src/sim/guest_abi.hh index 75c4e00268..96fcf89887 100644 --- a/src/sim/guest_abi.hh +++ b/src/sim/guest_abi.hh @@ -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(tc); - GuestABI::prepareForFunction(tc, state); - return GuestABI::callFrom(tc, state, target); + auto state = guest_abi::initializeState(tc); + guest_abi::prepareForFunction(tc, state); + return guest_abi::callFrom(tc, state, + target); } template @@ -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(tc); - GuestABI::prepareForArguments(tc, state); - GuestABI::callFrom(tc, state, target); + auto state = guest_abi::initializeState(tc); + guest_abi::prepareForArguments(tc, state); + guest_abi::callFrom(tc, state, target); } template @@ -108,12 +109,12 @@ dumpSimcall(std::string name, ThreadContext *tc, std::function target= std::function()) { - auto state = GuestABI::initializeState(tc); + auto state = guest_abi::initializeState(tc); std::ostringstream ss; - GuestABI::prepareForFunction(tc, state); + guest_abi::prepareForFunction(tc, state); ss << name; - GuestABI::dumpArgsFrom(ss, tc, state); + guest_abi::dumpArgsFrom(ss, tc, state); return ss.str(); } diff --git a/src/sim/guest_abi.test.cc b/src/sim/guest_abi.test.cc index 1828d85aa6..3dbe60f28a 100644 --- a/src/sim/guest_abi.test.cc +++ b/src/sim/guest_abi.test.cc @@ -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 } }; -} // 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 varargs) + guest_abi::VarArgs 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 varargs) + guest_abi::VarArgs 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(&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(&tc, testPrepareVoid); invokeSimcall(&tc, testPrepareInt); } -TEST(GuestABI, ABI_2D_args) +TEST(guest_abi, ABI_2D_args) { ThreadContext tc; invokeSimcall(&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(&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("test", &tc, testIntVoid); EXPECT_EQ(dump, "test(0, 11, 2, 13, ...)"); } -TEST(GuestABI, isVarArgs) +TEST(guest_abi, isVarArgs) { - EXPECT_TRUE(GuestABI::IsVarArgs>::value); - EXPECT_FALSE(GuestABI::IsVarArgs::value); - EXPECT_FALSE(GuestABI::IsVarArgs::value); + EXPECT_TRUE(guest_abi::IsVarArgs>::value); + EXPECT_FALSE(guest_abi::IsVarArgs::value); + EXPECT_FALSE(guest_abi::IsVarArgs::value); struct FooStruct {}; - EXPECT_FALSE(GuestABI::IsVarArgs::value); + EXPECT_FALSE(guest_abi::IsVarArgs::value); union FooUnion {}; - EXPECT_FALSE(GuestABI::IsVarArgs::value); + EXPECT_FALSE(guest_abi::IsVarArgs::value); } diff --git a/src/sim/guest_abi/definition.hh b/src/sim/guest_abi/definition.hh index 4928b93529..3f4fb21611 100644 --- a/src/sim/guest_abi/definition.hh +++ b/src/sim/guest_abi/definition.hh @@ -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__ diff --git a/src/sim/guest_abi/dispatch.hh b/src/sim/guest_abi/dispatch.hh index 32e07b4596..a4201444e0 100644 --- a/src/sim/guest_abi/dispatch.hh +++ b/src/sim/guest_abi/dispatch.hh @@ -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__ diff --git a/src/sim/guest_abi/layout.hh b/src/sim/guest_abi/layout.hh index 9c8f42f2da..19d8ba8d2d 100644 --- a/src/sim/guest_abi/layout.hh +++ b/src/sim/guest_abi/layout.hh @@ -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::get(tc, state); } -} // namespace GuestABI +} // namespace guest_abi #endif // __SIM_GUEST_ABI_LAYOUT_HH__ diff --git a/src/sim/guest_abi/varargs.hh b/src/sim/guest_abi/varargs.hh index 07ed2a195c..f80cce67ab 100644 --- a/src/sim/guest_abi/varargs.hh +++ b/src/sim/guest_abi/varargs.hh @@ -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 &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> } }; -} // namespace GuestABI +} // namespace guest_abi #endif // __SIM_GUEST_ABI_VARARGS_HH__ diff --git a/src/sim/proxy_ptr.hh b/src/sim/proxy_ptr.hh index cd0d409ed2..b3bbfd48d0 100644 --- a/src/sim/proxy_ptr.hh +++ b/src/sim/proxy_ptr.hh @@ -354,7 +354,8 @@ operator + (A a, const ProxyPtr &other) return other + a; } -namespace GuestABI +GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi); +namespace guest_abi { template @@ -379,7 +380,7 @@ struct Argument> } }; -} // namespace GuestABI +} // namespace guest_abi template std::ostream & diff --git a/src/sim/proxy_ptr.test.cc b/src/sim/proxy_ptr.test.cc index de0194d1b3..85d3e99726 100644 --- a/src/sim/proxy_ptr.test.cc +++ b/src/sim/proxy_ptr.test.cc @@ -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 } }; -} +} // namespace guest_abi bool abiCalled = false; bool abiCalledConst = false; @@ -501,7 +502,7 @@ abiTestFuncConst(ThreadContext *tc, ConstTestPtr ptr) EXPECT_EQ(ptr.addr(), 0x1000); } -TEST(ProxyPtr, GuestABI) +TEST(ProxyPtr, guest_abi) { BackingStore store(0x1000, 0x1000); diff --git a/src/sim/syscall_abi.hh b/src/sim/syscall_abi.hh index a60af425f8..150d8370b9 100644 --- a/src/sim/syscall_abi.hh +++ b/src/sim/syscall_abi.hh @@ -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 class SyscallDescABI : public SyscallDesc @@ -173,7 +173,7 @@ class SyscallDescABI : public SyscallDesc void returnInto(ThreadContext *tc, const SyscallReturn &ret) override { - GuestABI::Result::store(tc, ret); + guest_abi::Result::store(tc, ret); } }; diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index 291847acfb..eddc3bd80d 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -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 varargs) + int tgt_fd, int cmd, guest_abi::VarArgs varargs) { auto p = tc->getProcessPtr(); diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 0bd2fa5eef..647c8a3343 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -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 varargs); + int tgt_fd, int cmd, guest_abi::VarArgs varargs); /// Target fcntl64() handler. SyscallReturn fcntl64Func(SyscallDesc *desc, ThreadContext *tc, @@ -1092,7 +1092,7 @@ template SyscallReturn mremapFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> start, uint64_t old_length, uint64_t new_length, uint64_t flags, - GuestABI::VarArgs varargs) + guest_abi::VarArgs varargs) { auto p = tc->getProcessPtr(); Addr page_bytes = p->pTable->pageSize();