Implement instruction cache flush using sysarch(RISCV_SYNC_ICACHE).

Index: deps/v8/src/codegen/riscv64/cpu-riscv64.cc
--- deps/v8/src/codegen/riscv64/cpu-riscv64.cc.orig
+++ deps/v8/src/codegen/riscv64/cpu-riscv64.cc
@@ -4,7 +4,13 @@
 
 // CPU specific code for arm independent of OS goes here.
 
-#include <sys/syscall.h>
+#ifdef __OpenBSD__
+# include <sys/types.h>
+# include <machine/sysarch.h>
+#else
+# include <sys/syscall.h>
+#endif
+
 #include <unistd.h>
 
 #if V8_TARGET_ARCH_RISCV64
@@ -16,6 +22,10 @@ namespace internal {
 
 void CpuFeatures::FlushICache(void* start, size_t size) {
 #if !defined(USE_SIMULATOR)
+# ifdef __OpenBSD__
+	struct riscv_sync_icache_args args = { (u_int64_t)(uintptr_t)start, size };
+	sysarch(RISCV_SYNC_ICACHE, &args);
+# else
   char* end = reinterpret_cast<char*>(start) + size;
   // The definition of this syscall is
   // SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start,
@@ -23,6 +33,7 @@ void CpuFeatures::FlushICache(void* start, size_t size
   // The flag here is set to be SYS_RISCV_FLUSH_ICACHE_LOCAL, which is
   // defined as 1 in the Linux kernel.
   syscall(SYS_riscv_flush_icache, start, end, 1);
+# endif // !__OpenBSD__
 #endif  // !USE_SIMULATOR.
 }
 
