| Index: runtime/vm/cpu_arm64.cc
|
| diff --git a/runtime/vm/cpu_arm64.cc b/runtime/vm/cpu_arm64.cc
|
| index 0c089aeff0960e05640e42fb8f46da06fb9f20a4..14142ecfd4b65eb2ec362c76ce963fb784793236 100644
|
| --- a/runtime/vm/cpu_arm64.cc
|
| +++ b/runtime/vm/cpu_arm64.cc
|
| @@ -13,9 +13,11 @@
|
|
|
| #if !defined(USING_SIMULATOR)
|
| #if !defined(HOST_OS_FUCHSIA)
|
| -#include <sys/syscall.h> /* NOLINT */
|
| +#include <sys/syscall.h>
|
| +#else
|
| +#include <magenta/syscalls.h>
|
| #endif
|
| -#include <unistd.h> /* NOLINT */
|
| +#include <unistd.h>
|
| #endif
|
|
|
| namespace dart {
|
| @@ -34,12 +36,15 @@ void CPU::FlushICache(uword start, uword size) {
|
|
|
| // ARM recommends using the gcc intrinsic __clear_cache on Linux and Android.
|
| // blogs.arm.com/software-enablement/141-caches-and-self-modifying-code/
|
| -#if defined(HOST_OS_ANDROID) || defined(HOST_OS_FUCHSIA) || \
|
| - defined(HOST_OS_LINUX)
|
| +#if defined(HOST_OS_ANDROID) || defined(HOST_OS_LINUX)
|
| extern void __clear_cache(char*, char*);
|
| char* beg = reinterpret_cast<char*>(start);
|
| char* end = reinterpret_cast<char*>(start + size);
|
| ::__clear_cache(beg, end);
|
| +#elif defined(HOST_OS_FUCHSIA)
|
| + mx_status_t result = mx_cache_flush(reinterpret_cast<const void*>(start),
|
| + size, MX_CACHE_FLUSH_INSN);
|
| + ASSERT(result == MX_OK);
|
| #else
|
| #error FlushICache only tested/supported on Android, Fuchsia, and Linux
|
| #endif
|
|
|