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 <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26323
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
This commit is contained in:
Giacomo Travaglini
2020-03-05 13:29:49 +00:00
parent ea33d438a2
commit 1fef1491e2
2 changed files with 7 additions and 9 deletions

View File

@@ -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<ArmSystem *>(tc->getSystemPtr());
}
bool
ArmSystem::haveSecurity(ThreadContext *tc)
{

View File

@@ -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<ArmSystem *>(tc->getSystemPtr());
}
/** Returns true if the system of a specific thread context implements the
* Security Extensions