--- deps/v8/src/arm/cpu-arm.cc.orig 2018-08-15 13:53:24 UTC +++ deps/v8/src/arm/cpu-arm.cc @@ -7,6 +7,9 @@ #ifdef __QNXNTO__ #include // for cache flushing. #undef MAP_TYPE +#elif defined(__FreeBSD__) +#include +#include // for cache flushing. #else #include // for cache flushing. #endif @@ -24,6 +27,9 @@ void CpuFeatures::FlushICache(void* star #if !defined(USE_SIMULATOR) #if V8_OS_QNX msync(start, size, MS_SYNC | MS_INVALIDATE_ICACHE); +#elif defined(__FreeBSD__) + struct arm_sync_icache_args args = { .addr = (uintptr_t)start, .len = size }; + sysarch(ARM_SYNC_ICACHE, (void *)&args); #else register uint32_t beg asm("r0") = reinterpret_cast(start); register uint32_t end asm("r1") = beg + size;