Daniel Carvalho has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45433 )
Change subject: arch,sim: Rename GuestABI namespace as guest_abi
......................................................................
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 <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45433
Tested-by: kokoro <[email protected]>
Reviewed-by: Hoa Nguyen <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/arch/arm/aapcs32.hh
M src/arch/arm/aapcs64.hh
M src/arch/arm/aapcs64.test.cc
M src/arch/arm/freebsd/se_workload.hh
M src/arch/arm/linux/se_workload.hh
M src/arch/arm/reg_abi.hh
M src/arch/arm/semihosting.cc
M src/arch/arm/semihosting.hh
M src/arch/mips/se_workload.hh
M src/arch/power/se_workload.hh
M src/arch/riscv/se_workload.hh
M src/arch/sparc/pseudo_inst_abi.hh
M src/arch/sparc/se_workload.hh
M src/arch/x86/linux/linux.hh
M src/arch/x86/linux/se_workload.hh
M src/arch/x86/pseudo_inst_abi.hh
M src/kern/linux/printk.hh
M src/sim/guest_abi.hh
M src/sim/guest_abi.test.cc
M src/sim/guest_abi/definition.hh
M src/sim/guest_abi/dispatch.hh
M src/sim/guest_abi/layout.hh
M src/sim/guest_abi/varargs.hh
M src/sim/proxy_ptr.hh
M src/sim/proxy_ptr.test.cc
M src/sim/syscall_abi.hh
M src/sim/syscall_desc.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
29 files changed, 151 insertions(+), 124 deletions(-)
Approvals:
Hoa Nguyen: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/aapcs32.hh b/src/arch/arm/aapcs32.hh
index e1bd505..6302a6a 100644
--- a/src/arch/arm/aapcs32.hh
+++ b/src/arch/arm/aapcs32.hh
@@ -63,7 +63,8 @@
};
};
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
/*
@@ -355,7 +356,7 @@
}
};
-} // namespace GuestABI
+} // namespace guest_abi
/*
@@ -426,7 +427,8 @@
};
};
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
/*
@@ -634,6 +636,6 @@
}
};
-} // 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 3f07105..55e24d8 100644
--- a/src/arch/arm/aapcs64.hh
+++ b/src/arch/arm/aapcs64.hh
@@ -63,7 +63,8 @@
};
};
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
/*
@@ -420,6 +421,6 @@
}
};
-} // namespace GuestABI
+} // namespace guest_abi
#endif // __ARCH_ARM_AAPCS64_HH__
diff --git a/src/arch/arm/aapcs64.test.cc b/src/arch/arm/aapcs64.test.cc
index 69bbb83..8155d66 100644
--- a/src/arch/arm/aapcs64.test.cc
+++ b/src/arch/arm/aapcs64.test.cc
@@ -40,41 +40,41 @@
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 @@
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);
}
diff --git a/src/arch/arm/freebsd/se_workload.hh
b/src/arch/arm/freebsd/se_workload.hh
index 3690bb9..f2bfaf3 100644
--- a/src/arch/arm/freebsd/se_workload.hh
+++ b/src/arch/arm/freebsd/se_workload.hh
@@ -64,7 +64,8 @@
} // namespace ArmISA
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <typename ABI>
@@ -92,6 +93,6 @@
}
};
-} // namespace GuestABI
+} // namespace guest_abi
#endif // __ARCH_ARM_FREEBSD_SE_WORKLOAD_HH__
diff --git a/src/arch/arm/linux/se_workload.hh
b/src/arch/arm/linux/se_workload.hh
index 1c68e20..62df4ba 100644
--- a/src/arch/arm/linux/se_workload.hh
+++ b/src/arch/arm/linux/se_workload.hh
@@ -57,7 +57,8 @@
} // namespace ArmISA
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <typename ABI>
@@ -77,6 +78,6 @@
}
};
-} // namespace GuestABI
+} // namespace guest_abi
#endif // __ARCH_ARM_LINUX_SE_WORKLOAD_HH__
diff --git a/src/arch/arm/reg_abi.hh b/src/arch/arm/reg_abi.hh
index e738c5c..b1e3e5e 100644
--- a/src/arch/arm/reg_abi.hh
+++ b/src/arch/arm/reg_abi.hh
@@ -48,7 +48,8 @@
} // namespace ArmISA
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <typename ABI, typename Arg>
@@ -72,6 +73,6 @@
}
};
-} // namespace GuestABI
+} // namespace guest_abi
#endif // __ARCH_ARM_REG_ABI_HH__
diff --git a/src/arch/arm/semihosting.cc b/src/arch/arm/semihosting.cc
index 88a604e..e0f49ad 100644
--- a/src/arch/arm/semihosting.cc
+++ b/src/arch/arm/semihosting.cc
@@ -702,7 +702,8 @@
};
};
-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 @@
public Argument<ArmSemihosting::Abi64, T>
{};
-} // 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 d195d91..6a38a98 100644
--- a/src/arch/arm/semihosting.hh
+++ b/src/arch/arm/semihosting.hh
@@ -595,7 +595,8 @@
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 @@
}
};
-} // 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 63eba3c..7e17221 100644
--- a/src/arch/mips/se_workload.hh
+++ b/src/arch/mips/se_workload.hh
@@ -54,7 +54,8 @@
} // namespace MipsISA
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <>
@@ -80,6 +81,6 @@
}
};
-} // 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 ac79151..12cc994 100644
--- a/src/arch/power/se_workload.hh
+++ b/src/arch/power/se_workload.hh
@@ -54,7 +54,8 @@
} // namespace PowerISA
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <>
@@ -77,6 +78,6 @@
}
};
-} // 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 1f6bd20..248f90b 100644
--- a/src/arch/riscv/se_workload.hh
+++ b/src/arch/riscv/se_workload.hh
@@ -52,7 +52,8 @@
} // namespace RiscvISA
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <>
@@ -74,6 +75,6 @@
}
};
-} // 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 95bc460..2bcbef2 100644
--- a/src/arch/sparc/pseudo_inst_abi.hh
+++ b/src/arch/sparc/pseudo_inst_abi.hh
@@ -37,7 +37,8 @@
using State = int;
};
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <typename T>
@@ -64,6 +65,6 @@
}
};
-} // 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 0ad572a..13155e8 100644
--- a/src/arch/sparc/se_workload.hh
+++ b/src/arch/sparc/se_workload.hh
@@ -66,7 +66,8 @@
} // namespace SparcISA
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <typename ABI>
@@ -122,6 +123,6 @@
}
};
-} // namespace GuestABI
+} // namespace guest_abi
#endif // __ARCH_SPARC_SE_WORKLOAD_HH__
diff --git a/src/arch/x86/linux/linux.hh b/src/arch/x86/linux/linux.hh
index 5051325..830d9d8 100644
--- a/src/arch/x86/linux/linux.hh
+++ b/src/arch/x86/linux/linux.hh
@@ -69,7 +69,8 @@
class SyscallABI {};
};
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <typename ABI>
@@ -87,7 +88,7 @@
}
};
-};
+} // namespace guest_abi
class X86Linux64 : public X86Linux
{
diff --git a/src/arch/x86/linux/se_workload.hh
b/src/arch/x86/linux/se_workload.hh
index b8d1774..4188f1b 100644
--- a/src/arch/x86/linux/se_workload.hh
+++ b/src/arch/x86/linux/se_workload.hh
@@ -82,7 +82,8 @@
} // namespace X86ISA
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <typename Arg>
@@ -103,6 +104,6 @@
}
};
-} // namespace GuestABI
+} // namespace guest_abi
#endif // __ARCH_X86_LINUX_SE_WORKLOAD_HH__
diff --git a/src/arch/x86/pseudo_inst_abi.hh
b/src/arch/x86/pseudo_inst_abi.hh
index 04e8428..deec0b5 100644
--- a/src/arch/x86/pseudo_inst_abi.hh
+++ b/src/arch/x86/pseudo_inst_abi.hh
@@ -43,7 +43,8 @@
using State = int;
};
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <typename T>
@@ -81,4 +82,4 @@
}
};
-} // namespace GuestABI
+} // namespace guest_abi
diff --git a/src/kern/linux/printk.hh b/src/kern/linux/printk.hh
index 536031f..de3cbc9 100644
--- a/src/kern/linux/printk.hh
+++ b/src/kern/linux/printk.hh
@@ -40,7 +40,7 @@
{
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);
diff --git a/src/sim/guest_abi.hh b/src/sim/guest_abi.hh
index 75c4e00..96fcf89 100644
--- a/src/sim/guest_abi.hh
+++ b/src/sim/guest_abi.hh
@@ -49,9 +49,10 @@
{
// 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 @@
{
// 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 @@
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();
}
diff --git a/src/sim/guest_abi.test.cc b/src/sim/guest_abi.test.cc
index 1828d85..3dbe60f 100644
--- a/src/sim/guest_abi.test.cc
+++ b/src/sim/guest_abi.test.cc
@@ -89,7 +89,8 @@
};
};
-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 @@
}
};
-} // 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 @@
// 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 @@
// 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 @@
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 @@
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, 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);
}
diff --git a/src/sim/guest_abi/definition.hh
b/src/sim/guest_abi/definition.hh
index 4928b93..3f4fb21 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 @@
*/
};
-} // 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 32e07b4..a420144 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 @@
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 9c8f42f..19d8ba8 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 @@
return Argument<ABI, Arg>::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 07ed2a1..f80cce6 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 @@
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 @@
}
};
-} // 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 cd0d409..b3bbfd4 100644
--- a/src/sim/proxy_ptr.hh
+++ b/src/sim/proxy_ptr.hh
@@ -354,7 +354,8 @@
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 @@
}
};
-} // namespace GuestABI
+} // namespace guest_abi
template <typename T, typename Proxy>
std::ostream &
diff --git a/src/sim/proxy_ptr.test.cc b/src/sim/proxy_ptr.test.cc
index de0194d..85d3e99 100644
--- a/src/sim/proxy_ptr.test.cc
+++ b/src/sim/proxy_ptr.test.cc
@@ -163,7 +163,7 @@
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 @@
using State = int;
};
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
template <>
@@ -482,7 +483,7 @@
}
};
-}
+} // namespace guest_abi
bool abiCalled = false;
bool abiCalledConst = false;
@@ -501,7 +502,7 @@
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 a60af42..150d837 100644
--- a/src/sim/syscall_abi.hh
+++ b/src/sim/syscall_abi.hh
@@ -69,7 +69,8 @@
}
};
-namespace GuestABI
+GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
+namespace guest_abi
{
// For 64 bit systems, return syscall args directly.
@@ -104,6 +105,6 @@
}
};
-} // namespace GuestABI
+} // namespace guest_abi
#endif // __SIM_SYSCALL_ABI_HH__
diff --git a/src/sim/syscall_desc.hh b/src/sim/syscall_desc.hh
index cee0f0c..67dd028 100644
--- a/src/sim/syscall_desc.hh
+++ b/src/sim/syscall_desc.hh
@@ -105,7 +105,7 @@
/*
* 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 @@
void
returnInto(ThreadContext *tc, const SyscallReturn &ret) override
{
- GuestABI::Result<ABI, SyscallReturn>::store(tc, ret);
+ guest_abi::Result<ABI, SyscallReturn>::store(tc, ret);
}
};
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index 291847a..eddc3bd 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -714,7 +714,7 @@
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();
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 0bd2fa5..647c8a3 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -267,7 +267,7 @@
/// 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 @@
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();
6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45433
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I68700ef63479f1bb3eeab044b29dc09d86424608
Gerrit-Change-Number: 45433
Gerrit-PatchSet: 9
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s