Skip to content

Conversation

@HeliC829
Copy link
Contributor

This PR removes special-case -march option to maintain compatibility with non-vector devices for riscv64. Additionally, it also fixes a potential unaligned memory access and SIGBUS error in the mh_sha256 vector implementation for riscv64.

cc @sunyuechi

@HeliC829
Copy link
Contributor Author

HeliC829 commented Dec 31, 2025

@pablodelara Hi Pablo, please consider including this PR in release v2.26, it fixes some bugs on riscv64.

@HeliC829 HeliC829 force-pushed the fix-vector-option-and-sigerr branch from 8575658 to 780047f Compare January 1, 2026 08:56
When the compiler supports vector extensions, the -march option always
enables vector by default. This causes illegal instruction errors on RISC-V CPU without vector support. It is sufficient to enable the vector extension in the assembler via
`.option arch, +v`.

Signed-off-by: Julian Zhu <julian.oerv@isrc.iscas.ac.cn>
…ion for riscv64

Signed-off-by: Julian Zhu <julian.oerv@isrc.iscas.ac.cn>
@HeliC829 HeliC829 force-pushed the fix-vector-option-and-sigerr branch from 780047f to 3cf836b Compare January 3, 2026 05:37
@sunyuechi
Copy link

LGTM

@pablodelara
Copy link
Contributor

This is now merged, thanks!

@pablodelara pablodelara closed this Jan 8, 2026
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.

3 participants