Files
sdk/runtime/vm/cpu_arm.cc
T
turnidge@google.com 0ddd4c04e9 Dart_PropagateError, take 2.
This change hopefully takes care of the non-mac build issues.  The
checked mode failures are fixed in a separate cl.
Review URL: https://chromiumcodereview.appspot.com//9316071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3863 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 19:05:06 +00:00

59 lines
1.4 KiB
C++

// Copyright (c) 2012, 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_ARM)
#if defined(HOST_ARCH_ARM)
#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_ARM)
#if defined(__ARM_EABI__) && !defined(__thumb__)
syscall(__ARM_NR_cacheflush, start, start + size, 0);
#else
#error FlushICache only tested/supported on EABI ARM currently.
#endif
#else // defined(HOST_ARCH_ARM)
// 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_ARM)
}
void CPU::JumpToExceptionHandler(uword program_counter,
uword stack_pointer,
uword frame_pointer,
const Instance& exception_object,
const Instance& stacktrace_object) {
UNIMPLEMENTED();
}
void CPU::JumpToErrorHandler(
uword program_counter,
uword stack_pointer,
uword frame_pointer,
const Error& error) {
UNIMPLEMENTED();
}
const char* CPU::Id() {
return "arm";
}
} // namespace dart
#endif // defined TARGET_ARCH_ARM