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

Unified Diff: runtime/vm/cpu_mips.h

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/assembler_mips_test.cc ('k') | runtime/vm/cpu_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cpu_mips.h
===================================================================
--- runtime/vm/cpu_mips.h (revision 34370)
+++ runtime/vm/cpu_mips.h (working copy)
@@ -17,6 +17,12 @@
// additionally mock the options needed for the target architecture so that
// they may be altered for testing.
+enum MIPSVersion {
+ MIPS32,
+ MIPS32r2,
+ MIPSvUnknown,
+};
+
class HostCPUFeatures: public AllStatic {
public:
static void InitOnce();
@@ -25,9 +31,14 @@
DEBUG_ASSERT(initialized_);
return hardware_;
}
+ static MIPSVersion mips_version() {
+ DEBUG_ASSERT(initialized_);
+ return mips_version_;
+ }
private:
static const char* hardware_;
+ static MIPSVersion mips_version_;
#if defined(DEBUG)
static bool initialized_;
#endif
@@ -47,6 +58,9 @@
static bool double_truncate_round_supported() {
return false;
}
+ static MIPSVersion mips_version() {
+ return HostCPUFeatures::mips_version();
+ }
};
} // namespace dart
« no previous file with comments | « runtime/vm/assembler_mips_test.cc ('k') | runtime/vm/cpu_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698