Skip to content

Commit

Permalink
Update jit_compiler_a64_static.S
Browse files Browse the repository at this point in the history
  • Loading branch information
SChernykh committed Oct 18, 2023
1 parent 0498eaf commit def1f78
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/jit_compiler_a64_static.S
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ DECL(randomx_clear_cache):
cmp x0, x1
bhs randomx_clear_cache_exit

# test
ret

# Read "Cache Type Register, EL0"
# https://developer.arm.com/documentation/ddi0488/h/system-control/aarch64-register-descriptions/cache-type-register--el0
mrs x4, ctr_el0
Expand All @@ -76,13 +79,13 @@ DECL(randomx_clear_cache):
# Invalidate all data cache lines between x0 and x1
mov x2, x0
randomx_dcache_invalidate_loop:
#dc cvau, x2
dc cvau, x2
add x2, x2, x3
cmp x2, x1
blo randomx_clear_cache_loop

# Data Synchronization Barrier
#dsb ish
dsb ish

# [3:0] IminLine
# Log2 of the number of words in the smallest cache line of all the Instruction Caches that the processor controls
Expand All @@ -93,13 +96,13 @@ randomx_dcache_invalidate_loop:
# Invalidate all instruction cache lines between x0 and x1
mov x2, x0
randomx_clear_cache_loop:
#ic ivau, x2
ic ivau, x2
add x2, x2, x3
cmp x2, x1
blo randomx_clear_cache_loop

# Instruction Synchronization Barrier
#isb sy
isb sy

randomx_clear_cache_exit:
ret
Expand Down

0 comments on commit def1f78

Please sign in to comment.