Index: runtime/vm/cpu_arm.h |
=================================================================== |
--- runtime/vm/cpu_arm.h (revision 33442) |
+++ runtime/vm/cpu_arm.h (working copy) |
@@ -18,6 +18,12 @@ |
// additionally mock the options needed for the target architecture so that |
// they may be altered for testing. |
+enum ARMVersion { |
+ ARMv6, |
+ ARMv7, |
+ ARMvUnknown, |
+}; |
+ |
class HostCPUFeatures: public AllStatic { |
public: |
static void InitOnce(); |
@@ -34,6 +40,10 @@ |
DEBUG_ASSERT(initialized_); |
return neon_supported_; |
} |
+ static ARMVersion arm_version() { |
+ DEBUG_ASSERT(initialized_); |
+ return arm_version_; |
+ } |
#if !defined(HOST_ARCH_ARM) |
static void set_integer_division_supported(bool supported) { |
@@ -44,12 +54,17 @@ |
DEBUG_ASSERT(initialized_); |
neon_supported_ = supported; |
} |
+ static void set_arm_version(ARMVersion version) { |
+ DEBUG_ASSERT(initialized_); |
+ arm_version_ = version; |
+ } |
#endif // !defined(HOST_ARCH_ARM) |
private: |
static const char* hardware_; |
static bool integer_division_supported_; |
static bool neon_supported_; |
+ static ARMVersion arm_version_; |
#if defined(DEBUG) |
static bool initialized_; |
#endif |
@@ -75,6 +90,9 @@ |
static const char* hardware() { |
return HostCPUFeatures::hardware(); |
} |
+ static ARMVersion arm_version() { |
+ return HostCPUFeatures::arm_version(); |
+ } |
}; |
} // namespace dart |