v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
cpu-loong64.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 LoongArch independent of OS goes here.
6
7
#include <sys/syscall.h>
8
#include <unistd.h>
9
10
#if V8_TARGET_ARCH_LOONG64
11
12
#include "
src/codegen/cpu-features.h
"
13
14
namespace
v8
{
15
namespace
internal
{
16
17
void
CpuFeatures::FlushICache
(
void
*
start
,
size_t
size) {
18
#if defined(V8_HOST_ARCH_LOONG64)
19
// Nothing to do, flushing no instructions.
20
if
(size == 0) {
21
return
;
22
}
23
24
#if defined(ANDROID) && !defined(__LP64__)
25
// Bionic cacheflush can typically run in userland, avoiding kernel call.
26
char
*
end
=
reinterpret_cast<
char
*
>
(
start
) + size;
27
cacheflush(
reinterpret_cast<
intptr_t
>
(
start
),
reinterpret_cast<
intptr_t
>
(
end
),
28
0);
29
#else
// ANDROID
30
asm
(
"ibar 0\n"
);
31
#endif
// ANDROID
32
#endif
// V8_HOST_ARCH_LOONG64
33
}
34
35
}
// namespace internal
36
}
// namespace v8
37
38
#endif
// V8_TARGET_ARCH_LOONG64
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
loong64
cpu-loong64.cc
Generated on Sun Apr 6 2025 21:08:50 for v8 by
1.12.0