Files
sdk/runtime/vm/cpu_mips.cc
T
iposva@google.com c3c942407b Fix dartbug.com/10415:
- Append 'on "$os_$arch"' to the version string on the VM.

Review URL: https://codereview.chromium.org//14593004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22452 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-07 07:59:03 +00:00

43 lines
1.0 KiB
C++

// 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)
#if defined(HOST_ARCH_MIPS)
#include <asm/cachectl.h> /* NOLINT */
#include <sys/syscall.h> /* NOLINT */
#include <unistd.h> /* NOLINT */
#endif
#include "vm/cpu.h"
namespace dart {
void CPU::FlushICache(uword start, uword size) {
#if defined(HOST_ARCH_MIPS)
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(HOST_ARCH_MIPS)
"sim"
#endif // !defined(HOST_ARCH_MIPS)
"mips";
}
} // namespace dart
#endif // defined TARGET_ARCH_MIPS