riscv64: Fix build option and potential SIGBUS error#169
Closed
HeliC829 wants to merge 2 commits intointel:masterfrom
Closed
riscv64: Fix build option and potential SIGBUS error#169HeliC829 wants to merge 2 commits intointel:masterfrom
HeliC829 wants to merge 2 commits intointel:masterfrom
Conversation
Contributor
Author
|
@pablodelara Hi Pablo, please consider including this PR in release v2.26, it fixes some bugs on riscv64. |
8575658 to
780047f
Compare
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>
780047f to
3cf836b
Compare
|
LGTM |
Contributor
|
This is now merged, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes special-case
-marchoption 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