9 #if V8_TARGET_ARCH_ARM64
17 class CacheLineSizes {
21 cache_type_register_ = 0;
24 __asm__ __volatile__ (
"mrs %[ctr], ctr_el0"
25 : [ctr]
"=r" (cache_type_register_));
29 uint32_t icache_line_size()
const {
return ExtractCacheLineSize(0); }
30 uint32_t dcache_line_size()
const {
return ExtractCacheLineSize(16); }
33 uint32_t ExtractCacheLineSize(
int cache_line_size_shift)
const {
36 return 4 << ((cache_type_register_ >> cache_line_size_shift) & 0xf);
44 if (length == 0)
return;
59 uintptr_t dsize = sizes.dcache_line_size();
60 uintptr_t isize = sizes.icache_line_size();
68 __asm__ __volatile__ (
78 "dc cvau, %[dline] \n\t"
79 "add %[dline], %[dline], %[dsize] \n\t"
80 "cmp %[dline], %[end] \n\t"
98 "ic ivau, %[iline] \n\t"
99 "add %[iline], %[iline], %[isize] \n\t"
100 "cmp %[iline], %[end] \n\t"
109 : [dline]
"+r" (dstart),
110 [iline]
"+r" (istart)
111 : [dsize]
"r" (dsize),
static void FlushICache(void *start, size_t size)
#define DCHECK(condition)
int CountSetBits(uint64_t value, int width)
Debugger support for the V8 JavaScript engine.