RandomX: added BMI2 version for scratchpad prefetch
Saves 1 instruction and 1 byte in the main loop.
This commit is contained in:
parent
3ac8f6b23a
commit
d443dd86f1
6 changed files with 38 additions and 13 deletions
|
@ -29,6 +29,7 @@ IFDEF RAX
|
|||
_RANDOMX_JITX86_STATIC SEGMENT PAGE READ EXECUTE
|
||||
|
||||
PUBLIC randomx_prefetch_scratchpad
|
||||
PUBLIC randomx_prefetch_scratchpad_bmi2
|
||||
PUBLIC randomx_prefetch_scratchpad_end
|
||||
PUBLIC randomx_program_prologue
|
||||
PUBLIC randomx_program_prologue_first_load
|
||||
|
@ -70,6 +71,14 @@ randomx_prefetch_scratchpad PROC
|
|||
prefetcht0 [rsi+rdx]
|
||||
randomx_prefetch_scratchpad ENDP
|
||||
|
||||
randomx_prefetch_scratchpad_bmi2 PROC
|
||||
rorx rdx, rax, 32
|
||||
and eax, RANDOMX_SCRATCHPAD_MASK
|
||||
prefetcht0 [rsi+rax]
|
||||
and edx, RANDOMX_SCRATCHPAD_MASK
|
||||
prefetcht0 [rsi+rdx]
|
||||
randomx_prefetch_scratchpad_bmi2 ENDP
|
||||
|
||||
randomx_prefetch_scratchpad_end PROC
|
||||
randomx_prefetch_scratchpad_end ENDP
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue