Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: runtime/vm/cpu_arm.cc

Issue 1077823002: Adds a simarmv5te build and test target. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_arm_test.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cpu_arm.cc
===================================================================
--- runtime/vm/cpu_arm.cc (revision 45179)
+++ runtime/vm/cpu_arm.cc (working copy)
@@ -20,14 +20,26 @@
namespace dart {
+// TODO(zra): Add a target for ARMv6.
+#if defined(TARGET_ARCH_ARM_5TE)
+DEFINE_FLAG(bool, use_vfp, false, "Use vfp instructions if supported");
+DEFINE_FLAG(bool, use_neon, false, "Use neon instructions if supported");
+DEFINE_FLAG(bool, use_integer_division, false,
+ "Use integer division instruction if supported");
+#else
DEFINE_FLAG(bool, use_vfp, true, "Use vfp instructions if supported");
DEFINE_FLAG(bool, use_neon, true, "Use neon instructions if supported");
+DEFINE_FLAG(bool, use_integer_division, true,
+ "Use integer division instruction if supported");
+#endif
+
#if !defined(HOST_ARCH_ARM)
-DEFINE_FLAG(bool, sim_use_armv7, true, "Use all ARMv7 instructions");
-DEFINE_FLAG(bool, sim_use_armv5te, false, "Restrict to ARMv5TE instructions");
-DEFINE_FLAG(bool, sim_use_armv6, false, "Restrict to ARMv6 instructions");
+#if defined(TARGET_ARCH_ARM_5TE)
DEFINE_FLAG(bool, sim_use_hardfp, false, "Use the softfp ABI.");
+#else
+DEFINE_FLAG(bool, sim_use_hardfp, true, "Use the softfp ABI.");
#endif
+#endif
void CPU::FlushICache(uword start, uword size) {
#if defined(HOST_ARCH_ARM)
@@ -121,10 +133,11 @@
bool is_krait = CpuInfo::FieldContains(kCpuInfoHardware, "QCT APQ8064");
if (is_krait) {
// Special case for Qualcomm Krait CPUs in Nexus 4 and 7.
- integer_division_supported_ = true;
+ integer_division_supported_ = FLAG_use_integer_division;
} else {
integer_division_supported_ =
- CpuInfo::FieldContains(kCpuInfoFeatures, "idiva") || is_arm64;
+ (CpuInfo::FieldContains(kCpuInfoFeatures, "idiva") || is_arm64) &&
+ FLAG_use_integer_division;
}
neon_supported_ =
(CpuInfo::FieldContains(kCpuInfoFeatures, "neon") || is_arm64) &&
@@ -160,19 +173,17 @@
void HostCPUFeatures::InitOnce() {
CpuInfo::InitOnce();
hardware_ = CpuInfo::GetCpuModel();
+
+#if defined(TARGET_ARCH_ARM_5TE)
+ arm_version_ = ARMv5TE;
+#else
+ arm_version_ = ARMv7;
+#endif
+
+ integer_division_supported_ = FLAG_use_integer_division;
vfp_supported_ = FLAG_use_vfp;
neon_supported_ = FLAG_use_vfp && FLAG_use_neon;
hardfp_supported_ = FLAG_sim_use_hardfp;
- if (FLAG_sim_use_armv5te) {
- arm_version_ = ARMv5TE;
- integer_division_supported_ = false;
- } else if (FLAG_sim_use_armv6) {
- arm_version_ = ARMv6;
- integer_division_supported_ = true;
- } else if (FLAG_sim_use_armv7) {
- arm_version_ = ARMv7;
- integer_division_supported_ = true;
- }
#if defined(DEBUG)
initialized_ = true;
#endif
« no previous file with comments | « runtime/vm/assembler_arm_test.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698