mirror of
https://github.com/xmrig/xmrig.git
synced 2026-04-17 21:12:58 -04:00
RandomX v2 (RISC-V)
This commit is contained in:
@@ -40,10 +40,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.global DECL(randomx_riscv64_prologue)
|
||||
.global DECL(randomx_riscv64_loop_begin)
|
||||
.global DECL(randomx_riscv64_data_read)
|
||||
.global DECL(randomx_riscv64_data_read_v2_tweak)
|
||||
.global DECL(randomx_riscv64_data_read_light)
|
||||
.global DECL(randomx_riscv64_data_read_light_v1)
|
||||
.global DECL(randomx_riscv64_data_read_light_v2)
|
||||
.global DECL(randomx_riscv64_fix_loop_call)
|
||||
.global DECL(randomx_riscv64_spad_store)
|
||||
.global DECL(randomx_riscv64_spad_store_hardaes)
|
||||
.global DECL(randomx_riscv64_spad_store_softaes)
|
||||
.global DECL(randomx_riscv64_loop_end)
|
||||
.global DECL(randomx_riscv64_fix_continue_loop)
|
||||
@@ -408,7 +410,9 @@ DECL(randomx_riscv64_data_read):
|
||||
slli x8, x8, 32
|
||||
srli x8, x8, 32
|
||||
#endif
|
||||
/* update "mx" */
|
||||
DECL(randomx_riscv64_data_read_v2_tweak):
|
||||
slli x8, x8, 32 /* JIT compiler will replace it with "nop" for RandomX v1 */
|
||||
/* update "mp" */
|
||||
xor x25, x25, x8
|
||||
/* read dataset and update registers */
|
||||
ld x8, 0(x7)
|
||||
@@ -456,13 +460,22 @@ DECL(randomx_riscv64_data_read_light):
|
||||
slli x25, x25, 32
|
||||
or x25, x25, x31
|
||||
#endif
|
||||
DECL(randomx_riscv64_data_read_light_v1):
|
||||
slli x8, x8, 32
|
||||
/* update "mx" */
|
||||
/* update "mp" */
|
||||
xor x25, x25, x8
|
||||
/* the next dataset item */
|
||||
and x7, x25, x1
|
||||
srli x7, x7, 6
|
||||
add x7, x7, x9
|
||||
DECL(randomx_riscv64_data_read_light_v2):
|
||||
/* the next dataset item */
|
||||
and x7, x25, x1
|
||||
srli x7, x7, 6
|
||||
add x7, x7, x9
|
||||
and x8, x8, x1
|
||||
/* update "mp" */
|
||||
xor x25, x25, x8
|
||||
DECL(randomx_riscv64_fix_loop_call):
|
||||
jal superscalar_hash /* JIT compiler will adjust the offset */
|
||||
xor x16, x16, x8
|
||||
@@ -536,9 +549,6 @@ DECL(randomx_riscv64_spad_store):
|
||||
sd x30, 56(x26)
|
||||
fmv.d.x f7, x30
|
||||
|
||||
DECL(randomx_riscv64_spad_store_hardaes):
|
||||
nop /* not implemented */
|
||||
|
||||
DECL(randomx_riscv64_spad_store_softaes):
|
||||
/* store integer registers */
|
||||
sd x16, 0(x27)
|
||||
|
||||
Reference in New Issue
Block a user