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

Unified Diff: runtime/vm/cpu_mips.cc

Issue 2858623002: Remove MIPS support (Closed)
Patch Set: Merge and cleanup Created 3 years, 6 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') | runtime/vm/cpu_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cpu_mips.cc
diff --git a/runtime/vm/cpu_mips.cc b/runtime/vm/cpu_mips.cc
deleted file mode 100644
index 902f59cb0f1196650771c7b02324de9b1a4a82e9..0000000000000000000000000000000000000000
--- a/runtime/vm/cpu_mips.cc
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "vm/globals.h"
-#if defined(TARGET_ARCH_MIPS)
-
-#include "vm/cpu.h"
-#include "vm/cpu_mips.h"
-
-#include "vm/cpuinfo.h"
-#include "vm/simulator.h"
-
-#if !defined(USING_SIMULATOR)
-#include <asm/cachectl.h> /* NOLINT */
-#include <sys/syscall.h> /* NOLINT */
-#include <unistd.h> /* NOLINT */
-#endif
-
-namespace dart {
-
-void CPU::FlushICache(uword start, uword size) {
-#if !defined(USING_SIMULATOR)
- int res;
- // See http://www.linux-mips.org/wiki/Cacheflush_Syscall.
- res = syscall(__NR_cacheflush, start, size, ICACHE);
- ASSERT(res == 0);
-#else // defined(HOST_ARCH_MIPS)
-// When running in simulated mode we do not need to flush the ICache because
-// we are not running on the actual hardware.
-#endif // defined(HOST_ARCH_MIPS)
-}
-
-
-const char* CPU::Id() {
- return
-#if defined(USING_SIMULATOR)
- "sim"
-#endif // !defined(HOST_ARCH_MIPS)
- "mips";
-}
-
-
-const char* HostCPUFeatures::hardware_ = NULL;
-MIPSVersion HostCPUFeatures::mips_version_ = MIPSvUnknown;
-#if defined(DEBUG)
-bool HostCPUFeatures::initialized_ = false;
-#endif
-
-
-#if !defined(USING_SIMULATOR)
-void HostCPUFeatures::InitOnce() {
- CpuInfo::InitOnce();
- 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
-}
-
-
-void HostCPUFeatures::Cleanup() {
- DEBUG_ASSERT(initialized_);
-#if defined(DEBUG)
- initialized_ = false;
-#endif
- ASSERT(hardware_ != NULL);
- free(const_cast<char*>(hardware_));
- hardware_ = NULL;
- CpuInfo::Cleanup();
-}
-
-#else
-
-void HostCPUFeatures::InitOnce() {
- CpuInfo::InitOnce();
- hardware_ = CpuInfo::GetCpuModel();
- mips_version_ = MIPS32r2;
-#if defined(DEBUG)
- initialized_ = true;
-#endif
-}
-
-
-void HostCPUFeatures::Cleanup() {
- DEBUG_ASSERT(initialized_);
-#if defined(DEBUG)
- initialized_ = false;
-#endif
- ASSERT(hardware_ != NULL);
- free(const_cast<char*>(hardware_));
- hardware_ = NULL;
- CpuInfo::Cleanup();
-}
-#endif // defined(HOST_ARCH_MIPS)
-
-} // namespace dart
-
-#endif // defined TARGET_ARCH_MIPS
« no previous file with comments | « runtime/vm/cpu_mips.h ('k') | runtime/vm/cpu_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698