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

Unified Diff: runtime/vm/cpu_mips.cc

Issue 211363007: Avoids MIPS32r2 instructions on MIPS32. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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/cpu_mips.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cpu_mips.cc
===================================================================
--- runtime/vm/cpu_mips.cc (revision 34370)
+++ runtime/vm/cpu_mips.cc (working copy)
@@ -41,6 +41,7 @@
const char* HostCPUFeatures::hardware_ = NULL;
+MIPSVersion HostCPUFeatures::mips_version_ = MIPSvUnknown;
#if defined(DEBUG)
bool HostCPUFeatures::initialized_ = false;
#endif
@@ -52,6 +53,15 @@
hardware_ = CpuInfo::GetCpuModel();
// Has a floating point unit.
ASSERT(CpuInfo::FieldContains(kCpuInfoModel, "FPU"));
+
+ // We want to know the ISA version, but on MIPS, CpuInfo can't tell us, so
+ // we use the same ISA version that Dart's C++ compiler targeted.
+#if defined(_MIPS_ARCH_MIPS32R2)
+ mips_version_ = MIPS32r2;
+#elif defined(_MIPS_ARCH_MIPS32)
+ mips_version_ = MIPS32;
+#endif
+
#if defined(DEBUG)
initialized_ = true;
#endif
@@ -74,6 +84,7 @@
void HostCPUFeatures::InitOnce() {
CpuInfo::InitOnce();
hardware_ = CpuInfo::GetCpuModel();
+ mips_version_ = MIPS32r2;
#if defined(DEBUG)
initialized_ = true;
#endif
« no previous file with comments | « runtime/vm/cpu_mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698