From: Giacomo Travaglini Date: Thu, 5 Mar 2020 13:29:49 +0000 (+0000) Subject: arch-arm: Hint the compiler to inline getArmSystem X-Git-Tag: v20.0.0.0~404 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1fef1491e217b28ef90d4ac9720572130100ca5a;p=gem5.git arch-arm: Hint the compiler to inline getArmSystem By defining it in the header we are hinting the compiler to inline the method Change-Id: I132964bf8b8c0b5d5eb28868f15723177d049d38 Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26323 Tested-by: kokoro Reviewed-by: Ciro Santilli --- diff --git a/src/arch/arm/system.cc b/src/arch/arm/system.cc index f9bfdec92..56ee98ded 100644 --- a/src/arch/arm/system.cc +++ b/src/arch/arm/system.cc @@ -50,7 +50,6 @@ #include "dev/arm/gic_v2.hh" #include "mem/fs_translating_port_proxy.hh" #include "mem/physical.hh" -#include "sim/full_system.hh" using namespace std; using namespace Linux; @@ -180,13 +179,6 @@ ArmSystem::initState() } } -ArmSystem* -ArmSystem::getArmSystem(ThreadContext *tc) -{ - assert(FullSystem); - return static_cast(tc->getSystemPtr()); -} - bool ArmSystem::haveSecurity(ThreadContext *tc) { diff --git a/src/arch/arm/system.hh b/src/arch/arm/system.hh index 26b417ed7..6331af283 100644 --- a/src/arch/arm/system.hh +++ b/src/arch/arm/system.hh @@ -48,6 +48,7 @@ #include "kern/linux/events.hh" #include "params/ArmSystem.hh" #include "params/GenericArmSystem.hh" +#include "sim/full_system.hh" #include "sim/sim_object.hh" #include "sim/system.hh" @@ -274,7 +275,12 @@ class ArmSystem : public System * Returns a valid ArmSystem pointer if using ARM ISA, it fails * otherwise. */ - static ArmSystem* getArmSystem(ThreadContext *tc); + static ArmSystem* + getArmSystem(ThreadContext *tc) + { + assert(FullSystem); + return static_cast(tc->getSystemPtr()); + } /** Returns true if the system of a specific thread context implements the * Security Extensions