v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
cpu-riscv.cc
Go to the documentation of this file.
1
// Copyright 2021 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// CPU specific code for arm independent of OS goes here.
6
7
#include <sys/syscall.h>
8
#include <unistd.h>
9
10
#include "
src/codegen/cpu-features.h
"
11
12
namespace
v8
{
13
namespace
internal
{
14
15
void
CpuFeatures::FlushICache
(
void
*
start
,
size_t
size) {
16
#if !defined(USE_SIMULATOR)
17
char
*
end
=
reinterpret_cast<
char
*
>
(
start
) + size;
18
// SYS_riscv_flush_icache is a symbolic constant used in user-space code to
19
// identify the flush_icache system call, while __NR_riscv_flush_icache is the
20
// corresponding system call number used in the kernel to dispatch the system
21
// call.
22
// The flag set to zero will flush all cpu cores.
23
syscall(__NR_riscv_flush_icache,
start
,
end
, 0);
24
#endif
// !USE_SIMULATOR.
25
}
26
27
}
// namespace internal
28
}
// namespace v8
v8::internal::CpuFeatures::FlushICache
static void FlushICache(void *start, size_t size)
Definition
cpu-riscv.cc:15
cpu-features.h
start
int start
Definition
debug-coverage.cc:595
end
int end
Definition
debug-coverage.cc:596
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
src
codegen
riscv
cpu-riscv.cc
Generated on Sun Apr 6 2025 21:08:50 for v8 by
1.12.0