Skip to content

Fix misaligned light-mode data loads in the RISC-V vector JIT - #367

Open
thomasbuilds wants to merge 1 commit into
tevador:masterfrom
thomasbuilds:fix-riscv-vector-light-data-alignment
Open

thomasbuilds wants to merge 1 commit into
tevador:masterfrom
thomasbuilds:fix-riscv-vector-light-data-alignment

Conversation

@thomasbuilds

Copy link
Copy Markdown
Contributor

randomx_riscv64_vector_program_main_loop_light_mode_data holds two 8-byte words that the light-mode loop reads with ld on every iteration. Nothing aligns them, and they end up misaligned, so each light-mode hash does 32,768 misaligned loads. On RISC-V cores without hardware support for misaligned access these trap and are either emulated (slow) or raise SIGBUS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant