summaryrefslogtreecommitdiff
path: root/src/arch/arm/process.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/process.hh')
-rw-r--r--src/arch/arm/process.hh19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/arch/arm/process.hh b/src/arch/arm/process.hh
index f4f0874c0..a6f46c1a0 100644
--- a/src/arch/arm/process.hh
+++ b/src/arch/arm/process.hh
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2012 ARM Limited
+* Copyright (c) 2012, 2018 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -61,6 +61,17 @@ class ArmProcess : public Process
ObjectFile::Arch _arch);
template<class IntType>
void argsInit(int pageSize, ArmISA::IntRegIndex spIndex);
+
+ template<class IntType>
+ IntType armHwcap() const
+ {
+ return static_cast<IntType>(armHwcapImpl());
+ }
+
+ /**
+ * AT_HWCAP is 32-bit wide on AArch64 as well so we can
+ * safely return an uint32_t */
+ virtual uint32_t armHwcapImpl() const = 0;
};
class ArmProcess32 : public ArmProcess
@@ -71,6 +82,9 @@ class ArmProcess32 : public ArmProcess
void initState();
+ /** AArch32 AT_HWCAP */
+ uint32_t armHwcapImpl() const override;
+
public:
ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width);
@@ -87,6 +101,9 @@ class ArmProcess64 : public ArmProcess
void initState();
+ /** AArch64 AT_HWCAP */
+ uint32_t armHwcapImpl() const override;
+
public:
ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width);