Skip to content

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

Merged
SChernykh merged 1 commit into
tevador:masterfrom
thomasbuilds:fix-riscv-vector-light-data-alignment
Oct 25, 2026
Merged

SChernykh merged 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.

@SChernykh
SChernykh merged commit ff6daa1 into tevador:master Oct 25, 2026
17 of 18 checks passed
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.

2 participants